ProjectLibertyLabs/gateway

Implement Authentication Session URL Retrieval in Gateway

Opened this issue · 0 comments

p5150j commented

Implement Authentication Session URL Retrieval in Gateway

Summary:

As a developer, I want to implement the functionality in the Gateway to retrieve an AuthenticationSessionUrl, so that the app backend can initiate the sign-in process.

Acceptance Criteria:

  • Implement the getAuthenticationSessionUrl() method in the Gateway.
  • Generate and sign the request payload (SiwaRequest).
  • Ensure that the Gateway communicates with Frequency Access (fa) to post the sign-in request and receives a 201 Created response with a Location header containing the AuthenticationSessionUrl.
  • Return the AuthenticationSessionUrl to the app backend.

Tasks:

  1. Develop the getAuthenticationSessionUrl() logic in the Gateway.
  2. Generate and sign the SiwaRequest payload.
  3. Implement the POST request to `/siwa/api/request' endpoint in Frequency Access.
  4. Handle the response, extract the AuthenticationSessionUrl from the Location header.
  5. Ensure proper error handling and logging.
  6. Write unit tests for the method.