com.atlassian.sal.core.xsrf
Class IndependentXsrfTokenAccessor

java.lang.Object
  extended by com.atlassian.sal.core.xsrf.IndependentXsrfTokenAccessor
All Implemented Interfaces:
XsrfTokenAccessor

public class IndependentXsrfTokenAccessor
extends Object
implements XsrfTokenAccessor

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

Since:
2.4

Field Summary
static String XSRF_COOKIE_KEY
           
 
Constructor Summary
IndependentXsrfTokenAccessor()
           
 
Method Summary
 String getXsrfToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean create)
          Get the persistent token for the given request, that is, the token stored in the users session or in a cookie, not the token submitted as part of a form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSRF_COOKIE_KEY

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

IndependentXsrfTokenAccessor

public IndependentXsrfTokenAccessor()
Method Detail

getXsrfToken

public String getXsrfToken(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response,
                           boolean create)
Description copied from interface: XsrfTokenAccessor
Get the persistent token for the given request, that is, the token stored in the users session or in a cookie, not the token submitted as part of a form.

Specified by:
getXsrfToken in interface XsrfTokenAccessor
Parameters:
request - The request to get the token from
response - The response to add the cookie to if necessary, can be null, if create is false.
create - Whether a new token should be created if there is none in the request. The new token should be persistent across subsequent requests, ie, added to the users session or a cookie.
Returns:
The token for the request, or null if no token was found and create was false


Copyright © 2011 Atlassian. All Rights Reserved.