Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new route to mock an authorization attempt with a CSP #53040

Closed
4 tasks done
bosawt opened this issue Feb 3, 2023 · 1 comment
Closed
4 tasks done

Create new route to mock an authorization attempt with a CSP #53040

bosawt opened this issue Feb 3, 2023 · 1 comment
Assignees
Labels
Identity All Identity related tickets identity-backend

Comments

@bosawt
Copy link
Collaborator

bosawt commented Feb 3, 2023

  • Create a new controller, Naming will be /mock/authorize, MockedAuthorizationController
  • The route will be scoped to ONLY localhost and development stacks (make sure this is defined in the routes.rb file)
  • The route will be a GET, and will accept a request like: http://localhost/mock/authorize?credential_info=<credential_info>
    • Params are:
      • credential_info
        • This is a serialized JSON blob representing the mocked credential information (varies depending on credential)
    • Response is:
      • <random_value_code>
        • This is described below
  • Once called, /mock/authorize will:
    • create a random value: SecureRandom.hex
    • store credential_info in a temporary redis (TTL suggestion: 5 minutes, but any reasonable default will do), with the ‘random value’ as the key
    • Return the created random value
@bramleyjl
Copy link
Contributor

Confirmed mocked auth route is returning an auth code on dev

image.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Identity All Identity related tickets identity-backend
Projects
None yet
Development

No branches or pull requests

2 participants