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 Object
Configuration options for the Authorization Server's UserInfo Endpoint.
  • Method Details

    • userService

      public OAuth2LoginConfigurer<B>.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<B extends HttpSecurityBuilder<B>>.UserInfoEndpointConfig for further configuration
    • oidcUserService

      public OAuth2LoginConfigurer<B>.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<B extends HttpSecurityBuilder<B>>.UserInfoEndpointConfig for further configuration
    • userAuthoritiesMapper

      public OAuth2LoginConfigurer<B>.UserInfoEndpointConfig userAuthoritiesMapper(org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper userAuthoritiesMapper)
      Sets the GrantedAuthoritiesMapper used for mapping OAuth2AuthenticatedPrincipal.getAuthorities().
      Parameters:
      userAuthoritiesMapper - the GrantedAuthoritiesMapper used for mapping the user's authorities
      Returns:
      the OAuth2LoginConfigurer<B extends HttpSecurityBuilder<B>>.UserInfoEndpointConfig for further configuration
    • and

      public OAuth2LoginConfigurer<B> and()
      Returns the OAuth2LoginConfigurer for further configuration.
      Returns:
      the OAuth2LoginConfigurer