Process Authorization Code and Retrieve SiwaPayloadResponse in Gateway
p5150j opened this issue · 0 comments
p5150j commented
Process Authorization Code and Retrieve SiwaPayloadResponse
in Gateway
Summary:
As a developer, I want the Gateway to process the authorizationCode
by exchanging it with Frequency Access for a SiwaPayloadResponse
, so that we can authenticate the user and obtain their credentials.
Acceptance Criteria:
- Implement logic in the Gateway to accept the
authorizationCode
from the app backend. - Gateway sends a GET request to
/siwa/api/payload
endpoint in Frequency Access to trade theauthorizationCode
for theSiwaPayloadResponse
. - Handle the response from Frequency Access, which includes the signed payload and credentials.
- Process the
SiwaPayloadResponse
to extract necessary user information.
Tasks:
- Implement the
processAuthorizationCode()
method in the Gateway. - Send a GET request to Frequency Access with the
authorizationCode
. - Handle the response, parse the
SiwaPayloadResponse
. - Validate the signed payload and extract user credentials.
- Ensure proper error handling for cases where the
authorizationCode
is invalid or expired. - Write unit tests for the method.