public final class DefaultCsrfToken extends Object implements CsrfToken
Constructor and Description |
---|
DefaultCsrfToken(String headerName,
String parameterName,
String token)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
String |
getHeaderName()
Gets the HTTP header that the CSRF is populated on the response and can
be placed on requests instead of the parameter.
|
String |
getParameterName()
Gets the HTTP parameter name that should contain the token.
|
String |
getToken()
Gets the token value.
|
public DefaultCsrfToken(String headerName, String parameterName, String token)
headerName
- the HTTP header name to useparameterName
- the HTTP parameter name to usetoken
- the value of the token (i.e. expected value of the HTTP parameter of parametername).public String getHeaderName()
CsrfToken
getHeaderName
in interface CsrfToken
public String getParameterName()
CsrfToken
getParameterName
in interface CsrfToken