public class CsrfPreventionFilter extends CsrfPreventionFilterBase
HttpServletResponse.encodeRedirectURL(String) and
HttpServletResponse.encodeURL(String) are used to encode all URLs
returned to the client
| Modifier and Type | Class | Description |
|---|---|---|
protected static class |
CsrfPreventionFilter.CsrfResponseWrapper |
|
protected static class |
CsrfPreventionFilter.LruCache<T> |
sm| Constructor | Description |
|---|---|
CsrfPreventionFilter() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
|
void |
setEntryPoints(java.lang.String entryPoints) |
Entry points are URLs that will not be tested for the presence of a valid
nonce.
|
void |
setNonceCacheSize(int nonceCacheSize) |
Sets the number of previously issued nonces that will be cached on a LRU
basis to support parallel requests, limited use of the refresh and back
in the browser and similar behaviors that may result in the submission
of a previous nonce rather than the current one.
|
generateNonce, getDenyStatus, getLogger, getRequestedPath, init, isConfigProblemFatal, setDenyStatus, setRandomClasspublic void setEntryPoints(java.lang.String entryPoints)
entryPoints - Comma separated list of URLs to be configured as
entry points.public void setNonceCacheSize(int nonceCacheSize)
nonceCacheSize - The number of nonces to cachepublic void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
java.io.IOExceptionjavax.servlet.ServletExceptionCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.