@FunctionalInterface
public interface OAuth2AuthorizedClientManager
Authorized Client(s).
The primary responsibilities include:
OAuth2AuthorizedClientProvider(s).OAuth2AuthorizedClient, typically using an
OAuth2AuthorizedClientService OR OAuth2AuthorizedClientRepository.| Modifier and Type | Method and Description |
|---|---|
OAuth2AuthorizedClient |
authorize(OAuth2AuthorizeRequest authorizeRequest)
Attempt to authorize or re-authorize (if required) the
client identified by the provided
clientRegistrationId. |
@Nullable OAuth2AuthorizedClient authorize(OAuth2AuthorizeRequest authorizeRequest)
client identified by the provided
clientRegistrationId.
Implementations must return null if authorization is not supported for the
specified client, e.g. the associated OAuth2AuthorizedClientProvider(s)
does not support the authorization 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. a
refresh token is not available OR
the access token is not expired.
authorizeRequest - the authorize requestOAuth2AuthorizedClient or null if authorization is not
supported for the specified client