public interface

XsrfTokenValidator

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

Class Overview

Verifies that a submitted token is valid.

Summary

Public Methods
abstract String getXsrfParameterName()
Returns the name of the http parameter name that is used to store the xsrf token in the form.
abstract boolean validateFormEncodedToken(HttpServletRequest request)
Validate a form encoded token.

Public Methods

public abstract String getXsrfParameterName ()

Returns the name of the http parameter name that is used to store the xsrf token in the form.

Returns
  • the name of the http parameter name

public abstract boolean validateFormEncodedToken (HttpServletRequest request)

Validate a form encoded token. Will first read the token from the cookie and then validate

Parameters
request the request that contains the token.
Returns
  • true if the token in the request matches the one in the cookie