com.atlassian.sal.api.xsrf
Class XsrfHeaderValidator
java.lang.Object
com.atlassian.sal.api.xsrf.XsrfHeaderValidator
public final class XsrfHeaderValidator
- extends Object
Provides an implementation of checking if a request or a header value
contains a valid TOKEN_HEADER header.
- Since:
- v2.10.12
|
Method Summary |
boolean |
isValidHeaderValue(String headerValue)
Returns true if the given header value is valid for the
TOKEN_HEADER header. |
boolean |
requestHasValidXsrfHeader(javax.servlet.http.HttpServletRequest request)
Returns true if the given HttpServletRequest contains a valid
TOKEN_HEADER header. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TOKEN_HEADER
public static final String TOKEN_HEADER
- See Also:
- Constant Field Values
XsrfHeaderValidator
public XsrfHeaderValidator()
requestHasValidXsrfHeader
public boolean requestHasValidXsrfHeader(javax.servlet.http.HttpServletRequest request)
- Returns true if the given HttpServletRequest contains a valid
TOKEN_HEADER header.
- Parameters:
request - the request to check.
- Returns:
- true if the given request contains a valid
TOKEN_HEADER
header, otherwise returns false.
isValidHeaderValue
public boolean isValidHeaderValue(String headerValue)
- Returns true if the given header value is valid for the
TOKEN_HEADER header.
- Parameters:
headerValue - the value of the TOKEN_HEADER header.
- Returns:
- true if the given value of the
TOKEN_HEADER header
is valid, otherwise returns false.
Copyright © 2014 Atlassian. All Rights Reserved.