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)
Mon, Dec 16, 10:27 AM
Unknown Object (File)
Mon, Dec 16, 10:27 AM
Unknown Object (File)
Mon, Dec 16, 10:27 AM
Unknown Object (File)
Sat, Dec 14, 9:01 PM
Unknown Object (File)
Wed, Dec 4, 5:31 AM
Unknown Object (File)
Sat, Nov 23, 1:51 AM
Unknown Object (File)
Nov 8 2024, 10:48 AM
Unknown Object (File)
Nov 8 2024, 9:41 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!