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

How to view or access the token JSON? #346

Closed
surfer190 opened this issue Feb 12, 2020 · 3 comments
Closed

How to view or access the token JSON? #346

surfer190 opened this issue Feb 12, 2020 · 3 comments

Comments

@surfer190
Copy link

How do you get access to attributes on the client scope or view the entire access token payload from a view?

@surfer190
Copy link
Author

I enabled storing the id token in the session:

OIDC_STORE_ID_TOKEN = True

and then used the following code:

        auth_backend = OIDCAuthenticationBackend()
        id_token = self.request.session.get('oidc_id_token')   
        payload = auth_backend.verify_token(token=id_token)

To get the payload.
There is another issue in how do you refresh the token when new client scopes are added?

@akatsoulas
Copy link
Collaborator

Hi @surfer190 is this issue still relevant? Could you maybe describe in more detail what are you trying to achieve?

@surfer190
Copy link
Author

Hi,I was looking to view the contents of the id and access JWT's.
I achieved this with the code above.
I think a simple browser refresh or login/logout refreshed the client scopes.

Closing the issue.

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

No branches or pull requests

2 participants