Interface OAuth2AuthorizedClientService
-
- All Known Implementing Classes:
InMemoryOAuth2AuthorizedClientService
,JdbcOAuth2AuthorizedClientService
public interface OAuth2AuthorizedClientService
Implementations of this interface are responsible for the management ofAuthorized Client(s)
, which provide the purpose of associating anAccess Token
credential to aClient
and Resource Owner, who is thePrincipal
that originally granted the authorization.- Since:
- 5.0
- See Also:
OAuth2AuthorizedClient
,ClientRegistration
,Authentication
,OAuth2AccessToken
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends OAuth2AuthorizedClient>
TloadAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)
Returns theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-User'sPrincipal
name ornull
if not available.void
removeAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)
Removes theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-User'sPrincipal
name.void
saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal)
Saves theOAuth2AuthorizedClient
associating it to the provided End-UserAuthentication
(Resource Owner).
-
-
-
Method Detail
-
loadAuthorizedClient
<T extends OAuth2AuthorizedClient> T loadAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)
Returns theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-User'sPrincipal
name ornull
if not available.- Type Parameters:
T
- a type of OAuth2AuthorizedClient- Parameters:
clientRegistrationId
- the identifier for the client's registrationprincipalName
- the name of the End-UserPrincipal
(Resource Owner)- Returns:
- the
OAuth2AuthorizedClient
ornull
if not available
-
saveAuthorizedClient
void saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal)
Saves theOAuth2AuthorizedClient
associating it to the provided End-UserAuthentication
(Resource Owner).- Parameters:
authorizedClient
- the authorized clientprincipal
- the End-UserAuthentication
(Resource Owner)
-
removeAuthorizedClient
void removeAuthorizedClient(java.lang.String clientRegistrationId, java.lang.String principalName)
Removes theOAuth2AuthorizedClient
associated to the provided client registration identifier and End-User'sPrincipal
name.- Parameters:
clientRegistrationId
- the identifier for the client's registrationprincipalName
- the name of the End-UserPrincipal
(Resource Owner)
-
-