Class DelegatingAuthenticationFailureHandler

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onAuthenticationFailure​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException exception)
      Called when an authentication attempt fails.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DelegatingAuthenticationFailureHandler

        public DelegatingAuthenticationFailureHandler​(java.util.LinkedHashMap<java.lang.Class<? extends org.springframework.security.core.AuthenticationException>,​AuthenticationFailureHandler> handlers,
                                                      AuthenticationFailureHandler defaultHandler)
        Creates a new instance
        Parameters:
        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.
        Throws:
        java.lang.IllegalArgumentException - if invalid argument is specified
    • Method Detail

      • onAuthenticationFailure

        public void onAuthenticationFailure​(javax.servlet.http.HttpServletRequest request,
                                            javax.servlet.http.HttpServletResponse response,
                                            org.springframework.security.core.AuthenticationException exception)
                                     throws java.io.IOException,
                                            javax.servlet.ServletException
        Description copied from interface: AuthenticationFailureHandler
        Called when an authentication attempt fails.
        Specified by:
        onAuthenticationFailure in interface AuthenticationFailureHandler
        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:
        java.io.IOException
        javax.servlet.ServletException