Class DefaultCsrfToken
java.lang.Object
org.springframework.security.web.server.csrf.DefaultCsrfToken
- All Implemented Interfaces:
 Serializable,CsrfToken
A CSRF token that is used to protect against CSRF attacks.
- Since:
 - 5.0
 - See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionDefaultCsrfToken(String headerName, String parameterName, String token) Creates a new instance - 
Method Summary
 
- 
Constructor Details
- 
DefaultCsrfToken
Creates a new instance- Parameters:
 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).
 
 - 
 - 
Method Details
- 
getHeaderName
Description copied from interface:CsrfTokenGets 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:
 getHeaderNamein interfaceCsrfToken- Returns:
 - the HTTP header that the CSRF is populated on the response and can be placed on requests instead of the parameter
 
 - 
getParameterName
Description copied from interface:CsrfTokenGets the HTTP parameter name that should contain the token. Cannot be null.- Specified by:
 getParameterNamein interfaceCsrfToken- Returns:
 - the HTTP parameter name that should contain the token.
 
 - 
getToken
Description copied from interface:CsrfTokenGets the token value. Cannot be null. - 
equals
 - 
hashCode
public int hashCode() 
 -