com.atlassian.sal.api.xsrf
Interface XsrfTokenValidator


public interface XsrfTokenValidator

Verifies that a submitted token is valid.

Since:
2.4.

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.
 

Method Detail

validateFormEncodedToken

boolean validateFormEncodedToken(javax.servlet.http.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

getXsrfParameterName

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


Copyright © 2011 Atlassian. All Rights Reserved.