Class WebUtils
java.lang.Object
org.apache.drill.yarn.appMaster.http.WebUtils
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringGenerates a BASE64 encoded CSRF token from randomly generated 256-bit buffer according to the OWASP CSRF Prevention Cheat Sheetstatic StringgetCsrfTokenFromHttpRequest(javax.servlet.http.HttpServletRequest request) Retrieves the CSRF protection token from the HTTP request.
- 
Constructor Details- 
WebUtilspublic WebUtils()
 
- 
- 
Method Details- 
getCsrfTokenFromHttpRequestRetrieves the CSRF protection token from the HTTP request.- Parameters:
- request- HTTP request that contains a session that stores a CSRF protection token. If there is no session, that means that authentication is disabled.
- Returns:
- CSRF protection token, or an empty string if there is no session present.
 
- 
generateCsrfTokenGenerates a BASE64 encoded CSRF token from randomly generated 256-bit buffer according to the OWASP CSRF Prevention Cheat Sheet- Returns:
- randomly generated CSRF token.
 
 
-