com.atlassian.sal.core.xsrf
Class IndependentXsrfTokenValidator

java.lang.Object
  extended by com.atlassian.sal.core.xsrf.IndependentXsrfTokenValidator
All Implemented Interfaces:
XsrfTokenValidator

public class IndependentXsrfTokenValidator
extends Object
implements XsrfTokenValidator

XSRF token validator that manages its own tokens, not using the underlying applications XSRF tokens

Since:
2.4

Field Summary
static String XSRF_PARAM_NAME
           
 
Constructor Summary
IndependentXsrfTokenValidator(XsrfTokenAccessor accessor)
           
 
Method Summary
 String getXsrfParameterName()
          Returns the name of the http parameter name that is used to store the xsrf token in the form.
 boolean validateFormEncodedToken(javax.servlet.http.HttpServletRequest request)
          Validate a form encoded token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSRF_PARAM_NAME

public static final String XSRF_PARAM_NAME
See Also:
Constant Field Values
Constructor Detail

IndependentXsrfTokenValidator

public IndependentXsrfTokenValidator(XsrfTokenAccessor accessor)
Method Detail

validateFormEncodedToken

public boolean validateFormEncodedToken(javax.servlet.http.HttpServletRequest request)
Description copied from interface: XsrfTokenValidator
Validate a form encoded token. Will first read the token from the cookie and then validate

Specified by:
validateFormEncodedToken in interface XsrfTokenValidator
Parameters:
request - the request that contains the token.
Returns:
true if the token in the request matches the one in the cookie

getXsrfParameterName

public String getXsrfParameterName()
Description copied from interface: XsrfTokenValidator
Returns the name of the http parameter name that is used to store the xsrf token in the form.

Specified by:
getXsrfParameterName in interface XsrfTokenValidator
Returns:
the name of the http parameter name


Copyright © 2011 Atlassian. All Rights Reserved.