-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add userinfo_endpoint provider metadata to discovery endpoint #888
Conversation
…nown/openid-configuration
Scopes []string `json:"scopes_supported"` | ||
AuthMethods []string `json:"token_endpoint_auth_methods_supported"` | ||
Claims []string `json:"claims_supported"` | ||
UserInfoEndpoint string `json:"userinfo_endpoint"` |
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.
Maybe add omitempty
here?
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.
Not necessary since it is only a "recommended" attribute.
@@ -47,7 +47,8 @@ type Config struct { | |||
// StaticPasswords cause the server use this list of passwords rather than | |||
// querying the storage. Cannot be specified without enabling a passwords | |||
// database. | |||
StaticPasswords []password `json:"staticPasswords"` | |||
StaticPasswords []password `json:"staticPasswords"` | |||
UserInfoEndpoint string `json:"userInfoEndpoint"` |
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.
Plz add a comment to describe the UserInfoEndpoint. A link to https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata would also be helpful.
Scopes []string `json:"scopes_supported"` | ||
AuthMethods []string `json:"token_endpoint_auth_methods_supported"` | ||
Claims []string `json:"claims_supported"` | ||
UserInfoEndpoint string `json:"userinfo_endpoint"` |
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.
Not necessary since it is only a "recommended" attribute.
@rithujohn191 we don't implement this feature #376 Why would we return it in the metadata? |
I was under the impression that the claims in ID Token could serve the info needed. Sorry about that. That would make #376 a pre-requisite for this PR. |
This metadata is useful when you already have this endpoint implemented as other service. For now I'm solving this in other place ByteInternet/drf-oidc-auth#20.
I'm in doubt what to do with this PR. feel free to close it. |
We have been getting a lot of requests to support the user info endpoint but the general idea seems to be that users want this feature so that they can avoid the use of tokens. Which might not be the best practice in terms of security. I will go ahead and close out this PR for now until we make a final decision regarding the user info endpoint. Thanks again for sending this in. |
In our case we use the same JWT token to get userinfo from endpoint. When you make a decision let me know I would love to help. |
This adds userinfo_endpoint provider metadata to discovery endpoint .well-known/openid-configuration.
and make it editable in config file.
This is used for some smart OpenID connect authentication to provide user data profile or infomations.
https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata