Skip to content

improvement: allow configuring extra claims for a user #1017

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zachdaniel
Copy link
Collaborator

This is only half done. We still need to do one thing which is to modify the store_in_session helper to

  1. take opts and store the claims in the session so that they can be added to the user in LV hand off or when loading from the session.
  2. modify load_from_session and assign_new_resources to use the claims info from the session.

This allows for

  1. claims to be stored in the token that the client can read
  2. those claims to be used for writing policies/checks etc.

Now, in most setups, I would say not to store additional claims in the JWT and then actually use that information for authorization, but it is a legitimate optimization in many cases, or in situations where just being in possession of a given token is sufficient to authorize certain actions etc.

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.

1 participant