public abstract class AbstractCsrfTokenManager extends AbstractLoggableComponent implements CsrfTokenManager
CsrfTokenManager.| Constructor and Description |
|---|
AbstractCsrfTokenManager()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
CsrfToken |
generateUpdateToken(CsrfToken currentToken)
|
boolean |
isValidToken(CsrfToken token)
Checks if the given
CsrfToken that has been sent from the client is valid. |
void |
validateToken(CsrfToken token) |
createLogger, doInitialize, getLoggerdoInitialized, getInitializationState, initializeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerateInitialTokenpublic CsrfToken generateUpdateToken(CsrfToken currentToken)
generateUpdateToken in interface CsrfTokenManagercurrentToken - is the current CsrfToken that has previously been generated and may be
updated.currentToken (same instance) to keep the token or a new instance of
CsrfToken to replace the current token and expect the next request from the client to
provide that new token (e.g. to implement one-time tokens for highest level of protection).CsrfTokenManager.generateInitialToken()public void validateToken(CsrfToken token) throws SecurityException
validateToken in interface CsrfTokenManagertoken - is the token to validate.SecurityException - if the token is not valid.CsrfTokenManager.isValidToken(CsrfToken)public boolean isValidToken(CsrfToken token)
CsrfToken that has been sent from the client is valid. This method has to
correspond to CsrfTokenManager.generateInitialToken() and CsrfTokenManager.generateUpdateToken(CsrfToken). In case a
remote invocation is invoked that is secured (requires authentication and typically also authorization),
the CsrfToken has to be checked. A value of null is never valid and will always
fail. Only in case of a secured invocation and the presence of CsrfToken this method is invoked.isValidToken in interface CsrfTokenManagertoken - is the CsrfToken send from the client. Will not be null.true if the given token is valid, false otherwise (in case
of an CSRF attack or some technical bug).Copyright © 2001–2016 mmm-Team. All rights reserved.