public final class DelegatingReactiveOAuth2AuthorizedClientProvider extends java.lang.Object implements ReactiveOAuth2AuthorizedClientProvider
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.
ReactiveOAuth2AuthorizedClientProvider
Constructor and Description |
---|
DelegatingReactiveOAuth2AuthorizedClientProvider(java.util.List<ReactiveOAuth2AuthorizedClientProvider> authorizedClientProviders)
Constructs a
DelegatingReactiveOAuth2AuthorizedClientProvider using the provided parameters. |
DelegatingReactiveOAuth2AuthorizedClientProvider(ReactiveOAuth2AuthorizedClientProvider... authorizedClientProviders)
Constructs a
DelegatingReactiveOAuth2AuthorizedClientProvider using the provided parameters. |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<OAuth2AuthorizedClient> |
authorize(OAuth2AuthorizationContext context)
Attempt to authorize (or re-authorize) the
client in the provided context. |
public DelegatingReactiveOAuth2AuthorizedClientProvider(ReactiveOAuth2AuthorizedClientProvider... authorizedClientProviders)
DelegatingReactiveOAuth2AuthorizedClientProvider
using the provided parameters.authorizedClientProviders
- a list of ReactiveOAuth2AuthorizedClientProvider
(s)public DelegatingReactiveOAuth2AuthorizedClientProvider(java.util.List<ReactiveOAuth2AuthorizedClientProvider> authorizedClientProviders)
DelegatingReactiveOAuth2AuthorizedClientProvider
using the provided parameters.authorizedClientProviders
- a List
of OAuth2AuthorizedClientProvider
(s)public reactor.core.publisher.Mono<OAuth2AuthorizedClient> authorize(OAuth2AuthorizationContext context)
ReactiveOAuth2AuthorizedClientProvider
client
in the provided context.
Implementations must return an empty Mono
if authorization is not supported for the specified client,
e.g. the provider doesn't support the authorization grant
type configured for the client.authorize
in interface ReactiveOAuth2AuthorizedClientProvider
context
- the context that holds authorization-specific state for the clientOAuth2AuthorizedClient
or an empty Mono
if authorization is not supported for the specified client