public class CustomUserTypesOAuth2UserService extends java.lang.Object implements OAuth2UserService<OAuth2UserRequest,OAuth2User>
OAuth2UserService
that supports custom OAuth2User
types.
The custom user type(s) is supplied via the constructor,
using a Map
of OAuth2User
type keyed by String
,
which represents the Registration Id
of the Client.
OAuth2UserService
,
OAuth2UserRequest
,
OAuth2User
,
ClientRegistration
Constructor and Description |
---|
CustomUserTypesOAuth2UserService(java.util.Map<java.lang.String,java.lang.Class<? extends OAuth2User>> customUserTypes) |
Modifier and Type | Method and Description |
---|---|
OAuth2User |
loadUser(OAuth2UserRequest userRequest) |
public CustomUserTypesOAuth2UserService(java.util.Map<java.lang.String,java.lang.Class<? extends OAuth2User>> customUserTypes)
public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException
loadUser
in interface OAuth2UserService<OAuth2UserRequest,OAuth2User>
OAuth2AuthenticationException