Interface OAuth2AuthorizedClientManager
-
- All Known Implementing Classes:
AuthorizedClientServiceOAuth2AuthorizedClientManager,DefaultOAuth2AuthorizedClientManager
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface OAuth2AuthorizedClientManagerImplementations 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 anOAuth2AuthorizedClientServiceOROAuth2AuthorizedClientRepository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OAuth2AuthorizedClientauthorize(OAuth2AuthorizeRequest authorizeRequest)Attempt to authorize or re-authorize (if required) theclientidentified by the providedclientRegistrationId.
-
-
-
Method Detail
-
authorize
@Nullable OAuth2AuthorizedClient authorize(OAuth2AuthorizeRequest authorizeRequest)
Attempt to authorize or re-authorize (if required) theclientidentified by the providedclientRegistrationId. Implementations must returnnullif authorization is not supported for the specified client, e.g. the associatedOAuth2AuthorizedClientProvider(s) does not support theauthorization granttype configured for the client.In the case of re-authorization, implementations must return the provided
authorized clientif re-authorization is not supported for the client OR is not required, e.g. arefresh tokenis not available OR theaccess tokenis not expired.- Parameters:
authorizeRequest- the authorize request- Returns:
- the
OAuth2AuthorizedClientornullif authorization is not supported for the specified client
-
-