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
  • Field Details

  • Constructor Details

    • XsrfHeaderValidator

      public XsrfHeaderValidator()
  • Method Details

    • 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.