HomePhabricator
Diffusion Comm 8b4f79c57425

[Identity] Implement database client method to get pake registration

Description

[Identity] Implement database client method to get pake registration

Summary:
To log in a user with PAKE, the Identity service will need to fetch the user's PAKE registration data from DynamoDB. This diff introduces a method to do that. The user ID is the table's primary key, so we use that to call get_item. Then we deserialize the bytes stored in DDB to get a ServerRegistration object. If the client is unable to get a ServerRegistration object, it logs the error and returns None.

Depends on D3920

Test Plan: Tested all failure cases and the success case by having the client get an item from a sample DDB table

Reviewers: jimpo, palys-swm, karol-bisztyga

Reviewed By: jimpo, karol-bisztyga

Subscribers: ashoat, Adrian, yayabosh, atul

Differential Revision: https://phabricator.ashoat.com/D3921

Details