Class AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager

java.lang.Object
org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager
All Implemented Interfaces:
ReactiveOAuth2AuthorizedClientManager

public final class AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager extends Object implements ReactiveOAuth2AuthorizedClientManager
An implementation of a ReactiveOAuth2AuthorizedClientManager that is capable of operating outside of the context of a ServerWebExchange, e.g. in a scheduled/background thread and/or in the service-tier.

(When operating within the context of a ServerWebExchange, use DefaultReactiveOAuth2AuthorizedClientManager instead.)

This is a reactive equivalent of AuthorizedClientServiceOAuth2AuthorizedClientManager.

Authorized Client Persistence

This client manager utilizes a ReactiveOAuth2AuthorizedClientService to persist OAuth2AuthorizedClients.

By default, when an authorization attempt succeeds, the OAuth2AuthorizedClient will be saved in the authorized client service. This functionality can be changed by configuring a custom ReactiveOAuth2AuthorizationSuccessHandler via setAuthorizationSuccessHandler(ReactiveOAuth2AuthorizationSuccessHandler).

By default, when an authorization attempt fails due to an "invalid_grant" error, the previously saved OAuth2AuthorizedClient will be removed from the authorized client service. (The "invalid_grant" error generally occurs when a refresh token that is no longer valid is used to retrieve a new access token.) This functionality can be changed by configuring a custom ReactiveOAuth2AuthorizationFailureHandler via setAuthorizationFailureHandler(ReactiveOAuth2AuthorizationFailureHandler).

Since:
5.2.2
See Also: