public abstract class CsrfPreventionFilterBase extends FilterBase
sm
Constructor and Description |
---|
CsrfPreventionFilterBase() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
generateNonce()
Generate a once time token (nonce) for authenticating subsequent
requests.
|
int |
getDenyStatus()
Return response status code that is used to reject denied request.
|
protected Log |
getLogger() |
protected java.lang.String |
getRequestedPath(HttpServletRequest request) |
void |
init(FilterConfig filterConfig)
Called by the web container to indicate to a filter that it is being
placed into service.
|
protected boolean |
isConfigProblemFatal()
Determines if an exception when calling a setter or an unknown
configuration attribute triggers the failure of the this filter which in
turn will prevent the web application from starting.
|
void |
setDenyStatus(int denyStatus)
Set response status code that is used to reject denied request.
|
void |
setRandomClass(java.lang.String randomClass)
Specify the class to use to generate the nonces.
|
destroy
protected Log getLogger()
getLogger
in class FilterBase
public int getDenyStatus()
public void setDenyStatus(int denyStatus)
denyStatus
- HTTP status codepublic void setRandomClass(java.lang.String randomClass)
Random
.randomClass
- The name of the class to usepublic void init(FilterConfig filterConfig) throws ServletException
javax.servlet.Filter
init
in interface Filter
init
in class FilterBase
ServletException
protected boolean isConfigProblemFatal()
FilterBase
isConfigProblemFatal
in class FilterBase
true
if a problem should trigger the failure of this
filter, else false
protected java.lang.String generateNonce()
protected java.lang.String getRequestedPath(HttpServletRequest request)
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.