public class RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler extends java.lang.Object implements ReactiveOAuth2AuthorizationFailureHandler
ReactiveOAuth2AuthorizationFailureHandler that removes an
OAuth2AuthorizedClient when the OAuth2Error.getErrorCode() matches one
of the configured OAuth 2.0 error codes.| Modifier and Type | Class and Description |
|---|---|
static interface |
RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler.OAuth2AuthorizedClientRemover
|
| Modifier and Type | Field and Description |
|---|---|
static java.util.Set<java.lang.String> |
DEFAULT_REMOVE_AUTHORIZED_CLIENT_ERROR_CODES
The default OAuth 2.0 error codes that will trigger removal of the authorized
client.
|
| Constructor and Description |
|---|
RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler(RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler.OAuth2AuthorizedClientRemover authorizedClientRemover)
Constructs a
RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler using the
provided parameters. |
RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler(RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler.OAuth2AuthorizedClientRemover authorizedClientRemover,
java.util.Set<java.lang.String> removeAuthorizedClientErrorCodes)
Constructs a
RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler using the
provided parameters. |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<java.lang.Void> |
onAuthorizationFailure(org.springframework.security.oauth2.core.OAuth2AuthorizationException authorizationException,
org.springframework.security.core.Authentication principal,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Called when an OAuth 2.0 Client fails to authorize (or re-authorize) via the
authorization server or resource server.
|
public static final java.util.Set<java.lang.String> DEFAULT_REMOVE_AUTHORIZED_CLIENT_ERROR_CODES
OAuth2ErrorCodespublic RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler(RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler.OAuth2AuthorizedClientRemover authorizedClientRemover)
RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler using the
provided parameters.authorizedClientRemover - the RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler.OAuth2AuthorizedClientRemover used for
removing an OAuth2AuthorizedClient if the error code is one of the
DEFAULT_REMOVE_AUTHORIZED_CLIENT_ERROR_CODES.public RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler(RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler.OAuth2AuthorizedClientRemover authorizedClientRemover, java.util.Set<java.lang.String> removeAuthorizedClientErrorCodes)
RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler using the
provided parameters.authorizedClientRemover - the RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler.OAuth2AuthorizedClientRemover used for
removing an OAuth2AuthorizedClient if the error code is one of the
removeAuthorizedClientErrorCodes.removeAuthorizedClientErrorCodes - the OAuth 2.0 error codes which will
trigger removal of an authorized client.OAuth2ErrorCodespublic reactor.core.publisher.Mono<java.lang.Void> onAuthorizationFailure(org.springframework.security.oauth2.core.OAuth2AuthorizationException authorizationException,
org.springframework.security.core.Authentication principal,
java.util.Map<java.lang.String,java.lang.Object> attributes)
ReactiveOAuth2AuthorizationFailureHandleronAuthorizationFailure in interface ReactiveOAuth2AuthorizationFailureHandlerauthorizationException - the exception that contains details about what failedprincipal - the Principal that was attempted to be authorizedattributes - an immutable Map of extra optional attributes present
under certain conditions. For example, this might contain a
ServerWebExchange if the
authorization was performed within the context of a ServerWebExchange.Mono that completes after this handler has finished
handling the event.