public interface OAuth2AuthorizedClientService
Authorized Client(s)
, which provide the purpose of
associating an Access Token
credential
to a Client
and Resource Owner,
who is the Principal
that originally
granted the authorization.OAuth2AuthorizedClient
,
ClientRegistration
,
Authentication
,
OAuth2AccessToken
Modifier and Type | Method and Description |
---|---|
<T extends OAuth2AuthorizedClient> |
loadAuthorizedClient(java.lang.String clientRegistrationId,
java.lang.String principalName)
Returns the
OAuth2AuthorizedClient associated to the provided client
registration identifier and End-User's Principal name or null if
not available. |
void |
removeAuthorizedClient(java.lang.String clientRegistrationId,
java.lang.String principalName)
Removes the
OAuth2AuthorizedClient associated to the provided client
registration identifier and End-User's Principal name. |
void |
saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient,
Authentication principal)
Saves the
OAuth2AuthorizedClient associating it to the provided End-User
Authentication (Resource Owner). |
<T extends OAuth2AuthorizedClient> T loadAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)
OAuth2AuthorizedClient
associated to the provided client
registration identifier and End-User's Principal
name or null
if
not available.T
- a type of OAuth2AuthorizedClientclientRegistrationId
- the identifier for the client's registrationprincipalName
- the name of the End-User Principal
(Resource Owner)OAuth2AuthorizedClient
or null
if not availablevoid saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal)
OAuth2AuthorizedClient
associating it to the provided End-User
Authentication
(Resource Owner).authorizedClient
- the authorized clientprincipal
- the End-User Authentication
(Resource Owner)void removeAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)
OAuth2AuthorizedClient
associated to the provided client
registration identifier and End-User's Principal
name.clientRegistrationId
- the identifier for the client's registrationprincipalName
- the name of the End-User Principal
(Resource Owner)