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 org.springframework.security.oauth2.core.user.OAuth2User> customUserType, java.lang.String clientRegistrationId)Deprecated.SeeCustomUserTypesOAuth2UserServicefor alternative usage.OAuth2LoginConfigurer.UserInfoEndpointConfigoidcUserService(org.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest,org.springframework.security.oauth2.core.oidc.user.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(org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper userAuthoritiesMapper)Sets theGrantedAuthoritiesMapperused for mappingOAuth2AuthenticatedPrincipal.getAuthorities().OAuth2LoginConfigurer.UserInfoEndpointConfiguserService(org.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest,org.springframework.security.oauth2.core.user.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(org.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest,org.springframework.security.oauth2.core.user.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(org.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest,org.springframework.security.oauth2.core.oidc.user.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 org.springframework.security.oauth2.core.user.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(org.springframework.security.core.authority.mapping.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
-
-