Package org.springframework.security.web.server.authentication

# Class ServerAuthenticationEntryPointFailureHandler

java.lang.Object
org.springframework.security.web.server.authentication.ServerAuthenticationEntryPointFailureHandler

All Implemented Interfaces:
  `ServerAuthenticationFailureHandler`

public class ServerAuthenticationEntryPointFailureHandler extends Object implements ServerAuthenticationFailureHandler
Adapts a `ServerAuthenticationEntryPoint` into a `ServerAuthenticationFailureHandler`

Since:
  5.0

## Constructor Summary

Constructors
Constructor
Description
`ServerAuthenticationEntryPointFailureHandler(ServerAuthenticationEntryPoint authenticationEntryPoint)`

## Method Summary

Modifier and Type
Method
Description
`reactor.core.publisher.Mono<Void>`
`onAuthenticationFailure(WebFilterExchange webFilterExchange, org.springframework.security.core.AuthenticationException exception)`
Invoked when authentication attempt fails
`void`
`setRethrowAuthenticationServiceException(boolean rethrowAuthenticationServiceException)`
Set whether to rethrow `AuthenticationServiceException`s (defaults to true)

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ServerAuthenticationEntryPointFailureHandler

public ServerAuthenticationEntryPointFailureHandler(ServerAuthenticationEntryPoint authenticationEntryPoint)

## Method Details

### onAuthenticationFailure

public reactor.core.publisher.Mono<Void> onAuthenticationFailure(WebFilterExchange webFilterExchange, org.springframework.security.core.AuthenticationException exception)
Description copied from interface: `ServerAuthenticationFailureHandler`
Invoked when authentication attempt fails

Specified by:
  `onAuthenticationFailure` in interface `ServerAuthenticationFailureHandler`
Parameters:
  `webFilterExchange` - the exchange
  `exception` - the reason authentication failed
Returns:
  a completion notification (success or error)

### setRethrowAuthenticationServiceException

public void setRethrowAuthenticationServiceException(boolean rethrowAuthenticationServiceException)
Set whether to rethrow `AuthenticationServiceException`s (defaults to true)

Parameters:
  `rethrowAuthenticationServiceException` - whether to rethrow `AuthenticationServiceException`s
Since:
  5.8