Interface OAuth2AuthorizedClientManager
-
- All Known Implementing Classes:
AuthorizedClientServiceOAuth2AuthorizedClientManager
,DefaultOAuth2AuthorizedClientManager
public interface OAuth2AuthorizedClientManager
Implementations of this interface are responsible for the overall management ofAuthorized Client(s)
.The primary responsibilities include:
- Authorizing (or re-authorizing) an OAuth 2.0 Client
by leveraging an
OAuth2AuthorizedClientProvider
(s). - Delegating the persistence of an
OAuth2AuthorizedClient
, typically using anOAuth2AuthorizedClientService
OROAuth2AuthorizedClientRepository
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OAuth2AuthorizedClient
authorize(OAuth2AuthorizeRequest authorizeRequest)
Attempt to authorize or re-authorize (if required) theclient
identified by the providedclientRegistrationId
.
-
-
-
Method Detail
-
authorize
@Nullable OAuth2AuthorizedClient authorize(OAuth2AuthorizeRequest authorizeRequest)
Attempt to authorize or re-authorize (if required) theclient
identified by the providedclientRegistrationId
. Implementations must returnnull
if authorization is not supported for the specified client, e.g. the associatedOAuth2AuthorizedClientProvider
(s) does not support theauthorization grant
type configured for the client.In the case of re-authorization, implementations must return the provided
authorized client
if re-authorization is not supported for the client OR is not required, e.g. arefresh token
is not available OR theaccess token
is not expired.- Parameters:
authorizeRequest
- the authorize request- Returns:
- the
OAuth2AuthorizedClient
ornull
if authorization is not supported for the specified client
-
-