You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 26, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 26, 2026. It is now read-only.
How-to: Authorize an access token containing custom authorities #542
Currently working on this issue, but I do want to clarify my assumption as to the outline of what is to be covered in this How-To. Here's what I'm thinking:
Outline
Adding custom claims to JWT-based access tokens - starting with a more basic case of adding claims to every access token. Some of this is already covered in the UserInfo endpoint How-To, but I thought I'd cover it briefly again here.
Adding custom claims with authorities to JWT-based access tokens - adding custom claims to access tokens containing various authorities (roles, groups, permissions, etc.)
Internal static user - define sample roles, demonstrate how to populate a custom claim with the defined roles per user
Google OIDC - reading in Google OIDC claims about resource owner permissions
GitHub OIDC - reading in GitHub OIDC claims about resource owner permissions
@jgrandja let me know your thoughts on this -- if there's anything I should add or subtract.
@ddubson I wouldn't bother with the Google OIDC and GitHub login as it would require setup on the provider side to return certain claims and would make the doc more complicated. Let's just focus on the User configured in the UserDetailsService and configure roles, groups, permissions there and show how to map them to the claims in the JWT access token.
Activity
ddubson commentedon May 18, 2023
@jgrandja - I'd like to work on this how-to. May I request this assignment?
jgrandja commentedon May 18, 2023
Thanks @ddubson ! The issue is yours 👍
ddubson commentedon May 31, 2023
Currently working on this issue, but I do want to clarify my assumption as to the outline of what is to be covered in this How-To. Here's what I'm thinking:
Outline
@jgrandja let me know your thoughts on this -- if there's anything I should add or subtract.
jgrandja commentedon May 31, 2023
@ddubson I wouldn't bother with the Google OIDC and GitHub login as it would require setup on the provider side to return certain claims and would make the doc more complicated. Let's just focus on the
Userconfigured in theUserDetailsServiceand configure roles, groups, permissions there and show how to map them to the claims in the JWT access token.Adds how-to guide on adding authorities to access tokens
Adds how-to guide on adding authorities to access tokens
Get latest from source (#2)
Adds how-to guide on adding authorities to access tokens