
Baeldung · 8 min readSecurity
Customize the OpenID Connect 1.0 UserInfo Response in Spring Authorization Server
Learn how to customize the Spring Authorization Server UserInfo endpoint by implementing a service to supply additional claims, mapping those claims based on requested scopes, and registering the mapper in the server configuration. This enables client applications to receive richer profile data beyond the default subject claim.
- Define a UserInfoService that returns a record of user attributes for a given username
- Map requested scopes to OIDC claims in a Function that builds OidcUserInfo
- Register the custom UserInfoMapper in the SAS security filter chain configuration