Class OAuth2LoginConfigurer.UserInfoEndpointConfig
- java.lang.Object
-
- org.springframework.security.config.annotation.web.configurers.oauth2.client.OAuth2LoginConfigurer.UserInfoEndpointConfig
-
- Enclosing class:
- OAuth2LoginConfigurer<B extends HttpSecurityBuilder<B>>
public final class OAuth2LoginConfigurer.UserInfoEndpointConfig extends java.lang.ObjectConfiguration options for the Authorization Server's UserInfo Endpoint.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description OAuth2LoginConfigurer<B>and()Returns theOAuth2LoginConfigurerfor further configuration.OAuth2LoginConfigurer.UserInfoEndpointConfigcustomUserType(java.lang.Class<? extends OAuth2User> customUserType, java.lang.String clientRegistrationId)Deprecated.SeeCustomUserTypesOAuth2UserServicefor alternative usage.OAuth2LoginConfigurer.UserInfoEndpointConfigoidcUserService(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.OAuth2LoginConfigurer.UserInfoEndpointConfiguserAuthoritiesMapper(GrantedAuthoritiesMapper userAuthoritiesMapper)Sets theGrantedAuthoritiesMapperused for mappingOAuth2AuthenticatedPrincipal.getAuthorities().OAuth2LoginConfigurer.UserInfoEndpointConfiguserService(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 Detail
-
userService
public OAuth2LoginConfigurer.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.UserInfoEndpointConfigfor further configuration
-
oidcUserService
public OAuth2LoginConfigurer.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.UserInfoEndpointConfigfor further configuration
-
customUserType
@Deprecated public OAuth2LoginConfigurer.UserInfoEndpointConfig customUserType(java.lang.Class<? extends OAuth2User> customUserType, java.lang.String clientRegistrationId)
Deprecated.SeeCustomUserTypesOAuth2UserServicefor alternative usage.Sets a customOAuth2Usertype and associates it to the provided clientregistration identifier.- Parameters:
customUserType- a customOAuth2UsertypeclientRegistrationId- the client registration identifier- Returns:
- the
OAuth2LoginConfigurer.UserInfoEndpointConfigfor further configuration
-
userAuthoritiesMapper
public OAuth2LoginConfigurer.UserInfoEndpointConfig userAuthoritiesMapper(GrantedAuthoritiesMapper userAuthoritiesMapper)
Sets theGrantedAuthoritiesMapperused for mappingOAuth2AuthenticatedPrincipal.getAuthorities().- Parameters:
userAuthoritiesMapper- theGrantedAuthoritiesMapperused for mapping the user's authorities- Returns:
- the
OAuth2LoginConfigurer.UserInfoEndpointConfigfor further configuration
-
and
public OAuth2LoginConfigurer<B> and()
Returns theOAuth2LoginConfigurerfor further configuration.- Returns:
- the
OAuth2LoginConfigurer
-
-