egovframework.rfc3.iam.security.authentication
Class LoginFailureHandler

java.lang.Object
  extended by egovframework.rfc3.iam.security.authentication.LoginFailureHandler
All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationFailureHandler

public class LoginFailureHandler
extends java.lang.Object
implements org.springframework.security.web.authentication.AuthenticationFailureHandler


Constructor Summary
LoginFailureHandler()
           
LoginFailureHandler(java.lang.String defaultFailureUrl)
           
 
Method Summary
 void onAuthenticationFailure(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException exception)
          Performs the redirect or forward to the defaultFailureUrl if set, otherwise returns a 401 error code.
 void setAllowSessionCreation(boolean allowSessionCreation)
           
 void setDefaultFailureUrl(java.lang.String defaultFailureUrl)
          The URL which will be used as the failure destination.
 void setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy)
          Allows overriding of the behaviour when redirecting to a target URL.
 void setUseForward(boolean forwardToDestination)
          If set to true, performs a forward to the failure destination URL instead of a redirect.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginFailureHandler

public LoginFailureHandler()

LoginFailureHandler

public LoginFailureHandler(java.lang.String defaultFailureUrl)
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
Performs the redirect or forward to the defaultFailureUrl if set, otherwise returns a 401 error code.

If redirecting or forwarding, saveException will be called to cache the exception for use in the target view.

Specified by:
onAuthenticationFailure in interface org.springframework.security.web.authentication.AuthenticationFailureHandler
Throws:
java.io.IOException
javax.servlet.ServletException

setDefaultFailureUrl

public void setDefaultFailureUrl(java.lang.String defaultFailureUrl)
The URL which will be used as the failure destination.

Parameters:
defaultFailureUrl - the failure URL, for example "/loginFailed.jsp".

setUseForward

public void setUseForward(boolean forwardToDestination)
If set to true, performs a forward to the failure destination URL instead of a redirect. Defaults to false.


setRedirectStrategy

public void setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy)
Allows overriding of the behaviour when redirecting to a target URL.


setAllowSessionCreation

public void setAllowSessionCreation(boolean allowSessionCreation)