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)
Fri, Nov 8, 10:48 AM
Unknown Object (File)
Fri, Nov 8, 9:41 AM
Unknown Object (File)
Fri, Nov 8, 7:46 AM
Unknown Object (File)
Wed, Nov 6, 2:35 AM
Unknown Object (File)
Wed, Nov 6, 2:35 AM
Unknown Object (File)
Wed, Nov 6, 2:35 AM
Unknown Object (File)
Wed, Nov 6, 2:35 AM
Unknown Object (File)
Wed, Nov 6, 2:30 AM
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!