egovframework.rfc3.iam.security.authentication
Class RFC3AbstractAuthenticationTargetUrlRequestHandler

java.lang.Object
  extended by egovframework.rfc3.iam.security.authentication.RFC3AbstractAuthenticationTargetUrlRequestHandler
Direct Known Subclasses:
LoginSuccessHandler

public class RFC3AbstractAuthenticationTargetUrlRequestHandler
extends java.lang.Object

Base class containing the logic used by strategies which handle redirection to a URL and are passed an Authentication object as part of the contract. See AuthenticationSuccessHandler and LogoutSuccessHandler, for example.

Uses the following logic sequence to determine how it should handle the forward/redirect

Since:
3.0
Author:
Luke Taylor

Field Summary
static java.lang.String DEFAULT_TARGET_PARAMETER
           
 
Method Summary
 void setAlwaysUseDefaultTargetUrl(boolean alwaysUseDefaultTargetUrl)
          If true, will always redirect to the value of defaultTargetUrl (defaults to false).
 void setDefaultTargetUrl(java.lang.String defaultTargetUrl)
          Supplies the default target Url that will be used if no saved request is found in the session, or the alwaysUseDefaultTargetUrl property is set to true.
 void setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy)
          Allows overriding of the behaviour when redirecting to a target URL.
 void setTargetUrlParameter(java.lang.String targetUrlParameter)
          The current request will be checked for this parameter before and the value used as the target URL if present.
 void setUseReferer(boolean useReferer)
          If set to true the Referer header will be used (if available).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TARGET_PARAMETER

public static java.lang.String DEFAULT_TARGET_PARAMETER
Method Detail

setDefaultTargetUrl

public void setDefaultTargetUrl(java.lang.String defaultTargetUrl)
Supplies the default target Url that will be used if no saved request is found in the session, or the alwaysUseDefaultTargetUrl property is set to true. If not set, defaults to /. It will be treated as relative to the web-app's context path, and should include the leading /. Alternatively, inclusion of a scheme name (such as "http://" or "https://") as the prefix will denote a fully-qualified URL and this is also supported.

Parameters:
defaultTargetUrl -

setAlwaysUseDefaultTargetUrl

public void setAlwaysUseDefaultTargetUrl(boolean alwaysUseDefaultTargetUrl)
If true, will always redirect to the value of defaultTargetUrl (defaults to false).


setTargetUrlParameter

public void setTargetUrlParameter(java.lang.String targetUrlParameter)
The current request will be checked for this parameter before and the value used as the target URL if present.

Parameters:
targetUrlParameter - the name of the parameter containing the encoded target URL. Defaults to "spring-security-redirect".

setRedirectStrategy

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


setUseReferer

public void setUseReferer(boolean useReferer)
If set to true the Referer header will be used (if available). Defaults to false.