public class DefaultOAuth2UserService extends java.lang.Object implements OAuth2UserService<OAuth2UserRequest,OAuth2User>
OAuth2UserService
that supports standard OAuth 2.0 Provider's.
For standard OAuth 2.0 Provider's, the attribute name (from the UserInfo Response)
for the "user's name" is required and therefore must be supplied via
ClientRegistration.ProviderDetails.UserInfoEndpoint#getUserNameAttributeName()
.
NOTE: Attribute names are not standardized between providers and therefore will vary. Please consult the provider's API documentation for the set of supported user attribute names.
OAuth2UserService
,
OAuth2UserRequest
,
OAuth2User
,
DefaultOAuth2User
Constructor and Description |
---|
DefaultOAuth2UserService() |
Modifier and Type | Method and Description |
---|---|
OAuth2User |
loadUser(OAuth2UserRequest userRequest) |
public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException
loadUser
in interface OAuth2UserService<OAuth2UserRequest,OAuth2User>
OAuth2AuthenticationException