java.lang.Object
at.porscheinformatik.tapestry.csrfprotection.internal.DefaultCsrfToken
All Implemented Interfaces:
CsrfToken, Serializable

public class DefaultCsrfToken extends Object implements CsrfToken
Default CsrfToken implementation.
See Also:
  • Constructor Details

    • DefaultCsrfToken

      public DefaultCsrfToken(String headerName, String parameterName, String token)
      Creates a new instance.
      Parameters:
      headerName - the HTTP header name to use
      parameterName - the HTTP parameter name to use
      token - the value of the token (i.e. expected value of the HTTP parameter of parametername).
  • Method Details

    • getHeaderName

      public String getHeaderName()
      Description copied from interface: CsrfToken
      Gets the HTTP header that the CSRF is populated on the response and can be placed on requests instead of the parameter. Cannot be null.
      Specified by:
      getHeaderName in interface CsrfToken
      Returns:
      the HTTP header that the CSRF is populated on the response and can be placed on requests instead of the parameter
    • getParameterName

      public String getParameterName()
      Description copied from interface: CsrfToken
      Gets the HTTP parameter name that should contain the token. Cannot be null.
      Specified by:
      getParameterName in interface CsrfToken
      Returns:
      the HTTP parameter name that should contain the token.
    • getToken

      public String getToken()
      Description copied from interface: CsrfToken
      Gets the token value. Cannot be null.
      Specified by:
      getToken in interface CsrfToken
      Returns:
      the token value