public class CsrfTokenManager extends Object
| Constructor and Description |
|---|
CsrfTokenManager(CsrfTokenRepository tokenRepository,
String parameterName)
Initializes the secure token that will stay the same for the whole life cycle of this instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkToken(org.apache.tapestry5.services.Request request,
javax.servlet.http.HttpServletRequest httpServletRequest)
This method performs the check of the token.
|
CsrfToken |
getSessionToken()
Returns the token stored in this instance.
|
public CsrfTokenManager(CsrfTokenRepository tokenRepository, @Symbol(value="tapestry.csrf-token-parameter-name") String parameterName)
tokenRepository - an implementation of CsrfTokenRepositoryparameterName - symbol CsrfConstants.CSRF_TOKEN_PARAMETER_NAMEpublic CsrfToken getSessionToken()
public void checkToken(org.apache.tapestry5.services.Request request,
javax.servlet.http.HttpServletRequest httpServletRequest)
throws CsrfException
request - .httpServletRequest - .CsrfException - when token not there or token does not matchCopyright © 2013–2021 Porsche Informatik. All rights reserved.