public interface XsrfTokenGenerator
SimpleXsrfTokenGenerator should be good enough for anyone, but
this interface is provided just in case anyone wants to implement their own token generation
strategy.| Modifier and Type | Method and Description |
|---|---|
String |
generateToken(javax.servlet.http.HttpServletRequest request)
Generate a new form token for the current request.
|
String |
getToken(javax.servlet.http.HttpServletRequest request,
boolean create)
Retrieves the token from the request.
|
String |
getXsrfTokenName()
Convenience method which will return the name to be used for a supplied XsrfToken in a request.
|
boolean |
validateToken(javax.servlet.http.HttpServletRequest request,
String token)
Validate a form token received as part of a web request
|
String getToken(javax.servlet.http.HttpServletRequest request, boolean create)
request - the request the token is retrieved fromcreate - if true, a token will be created if it doesn't already existString generateToken(javax.servlet.http.HttpServletRequest request)
request - the request the token is being generated forString getXsrfTokenName()
boolean validateToken(javax.servlet.http.HttpServletRequest request,
String token)
request - the request the token was received intoken - the tokenCopyright © 2019 Atlassian. All rights reserved.