Skip to content

feat: capture access token from IdP #7

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

Merged
merged 3 commits into from
Nov 9, 2022
Merged

Conversation

shawnhankim
Copy link
Member

@shawnhankim shawnhankim commented Nov 9, 2022

Issue Item:

Background:

  • Current NJS implementation disregard the access_token that is being sent by the IdP and only uses the id_token to get stored in the NGINX Plus K/V store.

  • Token Recommandation

    When Using Do Don't
    ID Token - Assume the user is authenticated - Call an API
    - Get user profile data - Check if the client is allowed to access something.
    Access Token - Call an API - Inspect its content on the client
    - Check if the client is allowed to access something
    - Inspect its content on the server side

    courtesy: ID Token and Access Token: What's the Difference?

Description:

  • Captured the access_token sent by the IdP.
  • Stored the access_token in the k/v store as same as we store id_token and refresh_token
  • Some contents of README.md file is automatically changed by IDE. (e.g., * -> -)

Compatibility:

  • This PR does not block the existing features as it just adds access_token.

Exceptions:

  • The example of API authorization will be separately provided in the other PR.
  • The OIDC simulation tool (a bundle SPA and Docker environment for app) will be separately provided in the other PR to test the API authorization using this access_token.

@shawnhankim shawnhankim linked an issue Nov 9, 2022 that may be closed by this pull request
@shawnhankim shawnhankim merged commit 778c468 into main Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Capture access_token from IdP to forward it to the upstream service
2 participants