-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Allow adding fields from user info #44
base: main
Are you sure you want to change the base?
Conversation
This change makes it possible to extract extra fields form user info to the generated token. For example, to have `upn` from the Azure token be added to the final JWT, we can add the below to the oauth config section. extract upn from userinfo
@greenpau any feedback on this? |
@MartinWallgren , I do not have time to look at this at the moment. The idea sounds good. Just need to find some time to do maintenance of the plugin. Please ping me again if it is not merged by the end of august. |
m := make(map[string]interface{}) | ||
for k, v := range claims { | ||
if _, exists := b.userInfoFields[k]; exists { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MartinWallgren , thank you for the contribution. What is the effect of this? Is it possible to only add "select" fields as opposed to everything?
@MartinWallgren , please see ^ |
hi, any plan on adding this to a release? |
This change makes it possible to extract extra fields form user info to the generated token.
For example, to have
upn
from the Azure token be added to the final JWT, we can add the below to the oauth config section.This PR is an attempt to solve this greenpau/caddy-security#190