Class AuthenticationEntryPointFailureHandler
java.lang.Object
org.springframework.security.web.authentication.AuthenticationEntryPointFailureHandler
- All Implemented Interfaces:
AuthenticationFailureHandler
public class AuthenticationEntryPointFailureHandler
extends Object
implements AuthenticationFailureHandler
Adapts a
AuthenticationEntryPoint into a AuthenticationFailureHandler- Since:
- 5.2.0
-
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationEntryPointFailureHandler(AuthenticationEntryPoint authenticationEntryPoint) -
Method Summary
Modifier and TypeMethodDescriptionvoidonAuthenticationFailure(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationException exception) Called when an authentication attempt fails.voidsetRethrowAuthenticationServiceException(boolean rethrowAuthenticationServiceException) Set whether to rethrowAuthenticationServiceExceptions (defaults to false)
-
Constructor Details
-
AuthenticationEntryPointFailureHandler
-
-
Method Details
-
onAuthenticationFailure
public void onAuthenticationFailure(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationException exception) throws IOException, javax.servlet.ServletException Description copied from interface:AuthenticationFailureHandlerCalled when an authentication attempt fails.- Specified by:
onAuthenticationFailurein interfaceAuthenticationFailureHandler- Parameters:
request- the request during which the authentication attempt occurred.response- the response.exception- the exception which was thrown to reject the authentication request.- Throws:
IOExceptionjavax.servlet.ServletException
-
setRethrowAuthenticationServiceException
public void setRethrowAuthenticationServiceException(boolean rethrowAuthenticationServiceException) Set whether to rethrowAuthenticationServiceExceptions (defaults to false)- Parameters:
rethrowAuthenticationServiceException- whether to rethrowAuthenticationServiceExceptions- Since:
- 5.8
-