Class OAuth2LoginConfigurer.UserInfoEndpointConfig
java.lang.Object
org.springframework.security.config.annotation.web.configurers.oauth2.client.OAuth2LoginConfigurer.UserInfoEndpointConfig
- Enclosing class:
- OAuth2LoginConfigurer<B extends HttpSecurityBuilder<B>>
Configuration options for the Authorization Server's UserInfo Endpoint.
-
Method Summary
Modifier and TypeMethodDescriptionoidcUserService(OAuth2UserService<OidcUserRequest, OidcUser> oidcUserService) Sets the OpenID Connect 1.0 service used for obtaining the user attributes of the End-User from the UserInfo Endpoint.userAuthoritiesMapper(GrantedAuthoritiesMapper userAuthoritiesMapper) Sets theGrantedAuthoritiesMapperused for mappingOAuth2AuthenticatedPrincipal.getAuthorities().userService(OAuth2UserService<OAuth2UserRequest, OAuth2User> userService) Sets the OAuth 2.0 service used for obtaining the user attributes of the End-User from the UserInfo Endpoint.
-
Method Details
-
userService
public OAuth2LoginConfigurer<B>.UserInfoEndpointConfig userService(OAuth2UserService<OAuth2UserRequest, OAuth2User> userService) Sets the OAuth 2.0 service used for obtaining the user attributes of the End-User from the UserInfo Endpoint.- Parameters:
userService- the OAuth 2.0 service used for obtaining the user attributes of the End-User from the UserInfo Endpoint- Returns:
- the
OAuth2LoginConfigurer<B extends HttpSecurityBuilder<B>>.UserInfoEndpointConfigfor further configuration
-
oidcUserService
public OAuth2LoginConfigurer<B>.UserInfoEndpointConfig oidcUserService(OAuth2UserService<OidcUserRequest, OidcUser> oidcUserService) Sets the OpenID Connect 1.0 service used for obtaining the user attributes of the End-User from the UserInfo Endpoint.- Parameters:
oidcUserService- the OpenID Connect 1.0 service used for obtaining the user attributes of the End-User from the UserInfo Endpoint- Returns:
- the
OAuth2LoginConfigurer<B extends HttpSecurityBuilder<B>>.UserInfoEndpointConfigfor further configuration
-
userAuthoritiesMapper
public OAuth2LoginConfigurer<B>.UserInfoEndpointConfig userAuthoritiesMapper(GrantedAuthoritiesMapper userAuthoritiesMapper) Sets theGrantedAuthoritiesMapperused for mappingOAuth2AuthenticatedPrincipal.getAuthorities().- Parameters:
userAuthoritiesMapper- theGrantedAuthoritiesMapperused for mapping the user's authorities- Returns:
- the
OAuth2LoginConfigurer<B extends HttpSecurityBuilder<B>>.UserInfoEndpointConfigfor further configuration
-