public interface

XsrfTokenAccessor

com.atlassian.sal.api.xsrf.XsrfTokenAccessor
Known Indirect Subclasses

Class Overview

Gives access to the applications XSRF tokens

Summary

Public Methods
abstract String getXsrfToken(HttpServletRequest request, 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.

Public Methods

public abstract String getXsrfToken (HttpServletRequest request, 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.

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