R
- The type of OAuth 2.0 User RequestU
- The type of OAuth 2.0 Userpublic class DelegatingOAuth2UserService<R extends OAuth2UserRequest,U extends OAuth2User> extends java.lang.Object implements OAuth2UserService<R,U>
OAuth2UserService
that simply delegates to it's
internal List
of OAuth2UserService
(s).
Each OAuth2UserService
is given a chance to
load
an OAuth2User
with
the first non-null
OAuth2User
being returned.
OAuth2UserService
,
OAuth2UserRequest
,
OAuth2User
Constructor and Description |
---|
DelegatingOAuth2UserService(java.util.List<OAuth2UserService<R,U>> userServices)
Constructs a
DelegatingOAuth2UserService using the provided parameters. |
Modifier and Type | Method and Description |
---|---|
U |
loadUser(R userRequest)
Returns an
OAuth2User after obtaining the user attributes of the End-User
from the UserInfo Endpoint. |
public DelegatingOAuth2UserService(java.util.List<OAuth2UserService<R,U>> userServices)
DelegatingOAuth2UserService
using the provided parameters.userServices
- a List
of OAuth2UserService
(s)public U loadUser(R userRequest) throws OAuth2AuthenticationException
OAuth2UserService
OAuth2User
after obtaining the user attributes of the End-User
from the UserInfo Endpoint.loadUser
in interface OAuth2UserService<R extends OAuth2UserRequest,U extends OAuth2User>
userRequest
- the user requestOAuth2User
OAuth2AuthenticationException
- if an error occurs while attempting to obtain
the user attributes from the UserInfo Endpoint