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
Copy file name to clipboardExpand all lines: docs/src/docs/asciidoc/guides/how-to-userinfo.adoc
+20-5Lines changed: 20 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,10 @@ Before customizing the response, you need to enable the UserInfo endpoint.
22
22
The following listing shows how to enable the {spring-security-reference-base-url}/servlet/oauth2/resource-server/jwt.html[OAuth2 resource server configuration].
@@ -70,7 +79,10 @@ The mapper implementation receives an instance of `OidcUserInfoAuthenticationCon
70
79
The following listing shows how to use the customization option that is available while working directly with the `OAuth2AuthorizationServerConfigurer`.
This configuration maps claims from the access token (which is a JWT when using the xref:{docs-dir}/getting-started.adoc#sample.gettingStarted[Getting Started config]) to populate the user info response and provides the following:
76
88
@@ -83,6 +95,9 @@ This configuration maps claims from the access token (which is a JWT when using
83
95
The user info mapper is not limited to mapping claims from a JWT, but this is a simple example that demonstrates the customization option.
84
96
Similar to the <<customize-id-token,example shown earlier>> where we customize claims of the ID token, you can customize claims of the access token itself ahead of time, as in the following example:
Whether you customize the user info response directly or use this example and customize the access token, you can look up information in a database, perform an LDAP query, make a request to another service, or use any other means of obtaining the information you want to be presented in the user info response.
0 commit comments