Class DelegatingReactiveOAuth2AuthorizedClientProvider
java.lang.Object
org.springframework.security.oauth2.client.DelegatingReactiveOAuth2AuthorizedClientProvider
- All Implemented Interfaces:
ReactiveOAuth2AuthorizedClientProvider
public final class DelegatingReactiveOAuth2AuthorizedClientProvider
extends Object
implements ReactiveOAuth2AuthorizedClientProvider
An implementation of a
ReactiveOAuth2AuthorizedClientProvider that simply
delegates to it's internal List of
ReactiveOAuth2AuthorizedClientProvider(s).
Each provider is given a chance to
authorize the client in the
provided context with the first available OAuth2AuthorizedClient being
returned.
- Since:
- 5.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingReactiveOAuth2AuthorizedClientProvider(List<ReactiveOAuth2AuthorizedClientProvider> authorizedClientProviders) Constructs aDelegatingReactiveOAuth2AuthorizedClientProviderusing the provided parameters.DelegatingReactiveOAuth2AuthorizedClientProvider(ReactiveOAuth2AuthorizedClientProvider... authorizedClientProviders) Constructs aDelegatingReactiveOAuth2AuthorizedClientProviderusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<OAuth2AuthorizedClient>authorize(OAuth2AuthorizationContext context) Attempt to authorize (or re-authorize) theclientin the provided context.
-
Constructor Details
-
DelegatingReactiveOAuth2AuthorizedClientProvider
public DelegatingReactiveOAuth2AuthorizedClientProvider(ReactiveOAuth2AuthorizedClientProvider... authorizedClientProviders) Constructs aDelegatingReactiveOAuth2AuthorizedClientProviderusing the provided parameters.- Parameters:
authorizedClientProviders- a list ofReactiveOAuth2AuthorizedClientProvider(s)
-
DelegatingReactiveOAuth2AuthorizedClientProvider
public DelegatingReactiveOAuth2AuthorizedClientProvider(List<ReactiveOAuth2AuthorizedClientProvider> authorizedClientProviders) Constructs aDelegatingReactiveOAuth2AuthorizedClientProviderusing the provided parameters.- Parameters:
authorizedClientProviders- aListofOAuth2AuthorizedClientProvider(s)
-
-
Method Details
-
authorize
public reactor.core.publisher.Mono<OAuth2AuthorizedClient> authorize(OAuth2AuthorizationContext context) Description copied from interface:ReactiveOAuth2AuthorizedClientProviderAttempt to authorize (or re-authorize) theclientin the provided context. Implementations must return an emptyMonoif authorization is not supported for the specified client, e.g. the provider doesn't support theauthorization granttype configured for the client.- Specified by:
authorizein interfaceReactiveOAuth2AuthorizedClientProvider- Parameters:
context- the context that holds authorization-specific state for the client- Returns:
- the
OAuth2AuthorizedClientor an emptyMonoif authorization is not supported for the specified client
-