Class DelegatingReactiveOAuth2AuthorizedClientProvider
- java.lang.Object
-
- org.springframework.security.oauth2.client.DelegatingReactiveOAuth2AuthorizedClientProvider
-
- All Implemented Interfaces:
ReactiveOAuth2AuthorizedClientProvider
public final class DelegatingReactiveOAuth2AuthorizedClientProvider extends java.lang.Object implements ReactiveOAuth2AuthorizedClientProvider
An implementation of aReactiveOAuth2AuthorizedClientProvider
that simply delegates to it's internalList
ofReactiveOAuth2AuthorizedClientProvider
(s).Each provider is given a chance to
authorize
theclient
in the provided context with the first availableOAuth2AuthorizedClient
being returned.- Since:
- 5.2
- See Also:
ReactiveOAuth2AuthorizedClientProvider
-
-
Constructor Summary
Constructors Constructor Description DelegatingReactiveOAuth2AuthorizedClientProvider(java.util.List<ReactiveOAuth2AuthorizedClientProvider> authorizedClientProviders)
Constructs aDelegatingReactiveOAuth2AuthorizedClientProvider
using the provided parameters.DelegatingReactiveOAuth2AuthorizedClientProvider(ReactiveOAuth2AuthorizedClientProvider... authorizedClientProviders)
Constructs aDelegatingReactiveOAuth2AuthorizedClientProvider
using the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<OAuth2AuthorizedClient>
authorize(OAuth2AuthorizationContext context)
Attempt to authorize (or re-authorize) theclient
in the provided context.
-
-
-
Constructor Detail
-
DelegatingReactiveOAuth2AuthorizedClientProvider
public DelegatingReactiveOAuth2AuthorizedClientProvider(ReactiveOAuth2AuthorizedClientProvider... authorizedClientProviders)
Constructs aDelegatingReactiveOAuth2AuthorizedClientProvider
using the provided parameters.- Parameters:
authorizedClientProviders
- a list ofReactiveOAuth2AuthorizedClientProvider
(s)
-
DelegatingReactiveOAuth2AuthorizedClientProvider
public DelegatingReactiveOAuth2AuthorizedClientProvider(java.util.List<ReactiveOAuth2AuthorizedClientProvider> authorizedClientProviders)
Constructs aDelegatingReactiveOAuth2AuthorizedClientProvider
using the provided parameters.- Parameters:
authorizedClientProviders
- aList
ofOAuth2AuthorizedClientProvider
(s)
-
-
Method Detail
-
authorize
public reactor.core.publisher.Mono<OAuth2AuthorizedClient> authorize(OAuth2AuthorizationContext context)
Description copied from interface:ReactiveOAuth2AuthorizedClientProvider
Attempt to authorize (or re-authorize) theclient
in the provided context. Implementations must return an emptyMono
if authorization is not supported for the specified client, e.g. the provider doesn't support theauthorization grant
type configured for the client.- Specified by:
authorize
in interfaceReactiveOAuth2AuthorizedClientProvider
- Parameters:
context
- the context that holds authorization-specific state for the client- Returns:
- the
OAuth2AuthorizedClient
or an emptyMono
if authorization is not supported for the specified client
-
-