Page MenuHomePhabricator

[rust-node-addon] add client method to call getInboundKeysForUser
ClosedPublic

Authored by varun on Aug 23 2023, 8:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 4:27 PM
Unknown Object (File)
Thu, May 2, 3:33 PM
Unknown Object (File)
Tue, Apr 30, 6:35 PM
Unknown Object (File)
Sun, Apr 28, 3:59 PM
Unknown Object (File)
Fri, Apr 26, 1:57 PM
Unknown Object (File)
Tue, Apr 23, 10:31 PM
Unknown Object (File)
Tue, Apr 16, 11:38 PM
Unknown Object (File)
Tue, Apr 16, 5:58 PM
Subscribers

Details

Summary

client method calls the mentioned Identity service RPC. we return the keys specific to the device ID provided.

The error handling can be further improved later. For now I'm just returning Generic errors and logging appropriately.

Test Plan
  • called the new client method from keyserver.js after writing some test data to DDB. i got back the keys as expected.
  • tried calling the method with an invalid device ID and got an error.
  • tried calling the method with an invalid username and got an error.
  • tried calling the method with a malformed identifier_type string ("usernam") and got an error

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

remove unnecessary comments

varun requested review of this revision.Aug 23 2023, 8:57 AM
bartek added inline comments.
keyserver/addons/rust-node-addon/src/identity_client/mod.rs
142–144 ↗(On Diff #30262)

Can it be done this way? The same for others

This revision is now accepted and ready to land.Aug 23 2023, 12:27 PM
keyserver/addons/rust-node-addon/src/identity_client/mod.rs
142–144 ↗(On Diff #30262)

yep much cleaner!