| Constructor and Description |
|---|
CSRFTokenBean(CSRFTokenRepository tokenRepository) |
| Modifier and Type | Method and Description |
|---|---|
String |
field()
Prints a HTML input field with the CSRF Token associated with the current request.
|
String |
getHeaderName()
Returns the name of the header that is expected to contain the CSRF token.
|
String |
getParameterName()
Returns the name of the form parameter that is expected to contain the CSRF token.
|
String |
getToken()
Returns the value of the token associated with the current request.
|
@Autowired public CSRFTokenBean(CSRFTokenRepository tokenRepository)
public String getToken()
IllegalStateException - If this method is invoked outside a Spring MVC contextpublic String field()
${csrf.field()}
to any form to handle CSRF protection.public String getParameterName()
public String getHeaderName()
Copyright © 2018 FenixEdu. All rights reserved.