HomePhabricator
Diffusion Comm 8b26e15c7991

[keyserver] Introduce `isValidSIWEMessage` and use it to validate `message` in…

Description

[keyserver] Introduce isValidSIWEMessage and use it to validate message in siweAuthResponder

Summary:
Check that the values in SIWEMessage are as expected. Throw a ServerError in siweAuthResponder if not.


Depends on D6030

Test Plan:
Tried calling the endpoint with various inputs (correct and malformed). Set breakpoints throughout and ensured that things worked as expected.

Also moved siweStatement to lib so it could be shared outside of native.

Reviewers: ashoat, tomek

Reviewed By: ashoat

Differential Revision: https://phab.comm.dev/D6031

Details

Provenance
atulAuthored on Dec 27 2022, 12:49 AM
Reviewer
ashoat
Differential Revision
D6031: [keyserver] Introduce `isValidSIWEMessage` and use it to validate `message` in `siweAuthResponder`
Parents
rCOMMb443a8224f54: [lib] Introduce `SIWEMessage` type
Branches
Unknown
Tags
Unknown