public class XsrfTokenUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getOrCreateXsrfCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a pair of a xsrf cookie and whether the request contains a
xsrf cookie already.
|
static String |
getTokenFromRequestParameters(javax.servlet.http.HttpServletRequest request)
Returns the xsrf token value from the request parameters.
|
static String |
getXsrfToken(javax.servlet.http.HttpServletRequest request)
Returns value of the xsrf token for the given request
|
static String |
getXsrfTokenSource(javax.servlet.http.HttpServletRequest request) |
public static String getTokenFromRequestParameters(javax.servlet.http.HttpServletRequest request)
request
- the request to obtain the xsrf token from.public static String getXsrfTokenSource(javax.servlet.http.HttpServletRequest request)
@Nullable public static String getOrCreateXsrfCookie(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response)
request
- the executing request.response
- @Nullable public static String getXsrfToken(@NotNull javax.servlet.http.HttpServletRequest request)
request
- the executing requestCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.