public class DelegatingAuthenticationFailureHandler extends java.lang.Object implements AuthenticationFailureHandler
AuthenticationFailureHandler that delegates to other
AuthenticationFailureHandler instances based upon the type of
AuthenticationException passed into
onAuthenticationFailure(HttpServletRequest, HttpServletResponse, AuthenticationException)
.| Constructor and Description |
|---|
DelegatingAuthenticationFailureHandler(java.util.LinkedHashMap<java.lang.Class<? extends AuthenticationException>,AuthenticationFailureHandler> handlers,
AuthenticationFailureHandler defaultHandler)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
onAuthenticationFailure(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AuthenticationException exception)
Called when an authentication attempt fails.
|
public DelegatingAuthenticationFailureHandler(java.util.LinkedHashMap<java.lang.Class<? extends AuthenticationException>,AuthenticationFailureHandler> handlers, AuthenticationFailureHandler defaultHandler)
handlers - a map of the AuthenticationException class to the
AuthenticationFailureHandler that should be used. Each is considered in the
order they are specified and only the first AuthenticationFailureHandler is
ued. This parameter cannot specify null or empty.defaultHandler - the default AuthenticationFailureHandler that should
be used if none of the handlers matches. This parameter cannot specify null.java.lang.IllegalArgumentException - if invalid argument is specifiedpublic void onAuthenticationFailure(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AuthenticationException exception)
throws java.io.IOException,
javax.servlet.ServletException
onAuthenticationFailure in interface AuthenticationFailureHandlerrequest - the request during which the authentication attempt occurred.response - the response.exception - the exception which was thrown to reject the authentication
request.java.io.IOExceptionjavax.servlet.ServletException