Package org.springframework.security.config.annotation.web.configurers.oauth2.client

# 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 Summary

Modifier and Type
Method
Description
`OAuth2LoginConfigurer<B>`
`and()`
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0.
`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.
`OAuth2LoginConfigurer<B>.UserInfoEndpointConfig`
`userAuthoritiesMapper(org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper userAuthoritiesMapper)`
Sets the `GrantedAuthoritiesMapper` used for mapping `OAuth2AuthenticatedPrincipal.getAuthorities()`.
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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

@Deprecated(since="6.1", forRemoval=true) public OAuth2LoginConfigurer<B> and()
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0. Use `OAuth2LoginConfigurer.userInfoEndpoint(Customizer)` instead
Returns the `OAuth2LoginConfigurer` for further configuration.

Returns:
  the `OAuth2LoginConfigurer`