Class DefaultReactiveOAuth2AuthorizedClientManager

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

public final class DefaultReactiveOAuth2AuthorizedClientManager extends Object implements ReactiveOAuth2AuthorizedClientManager
The default implementation of a ReactiveOAuth2AuthorizedClientManager for use within the context of a ServerWebExchange.

(When operating outside of the context of a ServerWebExchange, use AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager instead.)

This is a reactive equivalent of DefaultOAuth2AuthorizedClientManager.

Authorized Client Persistence

This client manager utilizes a ServerOAuth2AuthorizedClientRepository to persist OAuth2AuthorizedClients.

By default, when an authorization attempt succeeds, the OAuth2AuthorizedClient will be saved in the authorized client repository. 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 repository. (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
See Also: