public class WebUtils extends Object
| Constructor and Description |
|---|
WebUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
generateCsrfToken()
Generates a BASE64 encoded CSRF token from randomly generated 256-bit buffer
according to the OWASP CSRF Prevention Cheat Sheet
|
static String |
getCsrfTokenFromHttpRequest(javax.servlet.http.HttpServletRequest request)
Retrieves the CSRF protection token from the HTTP request.
|
public static String getCsrfTokenFromHttpRequest(javax.servlet.http.HttpServletRequest request)
request - HTTP request that contains a session that stores a CSRF protection token.
If there is no session, that means that authentication is disabled.public static String generateCsrfToken()
Copyright © 2021 The Apache Software Foundation. All rights reserved.