Package org.apache.shiro.web.config
Class ShiroFilterConfiguration
- java.lang.Object
-
- org.apache.shiro.web.config.ShiroFilterConfiguration
-
public class ShiroFilterConfiguration extends Object
Configuration for Shiro's root level servlet filter.- Since:
- 1.10.0
-
-
Constructor Summary
Constructors Constructor Description ShiroFilterConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisFilterOncePerRequest()Returnstrueif the filter should only execute once per request.booleanisStaticSecurityManagerEnabled()Returnstrueif the constructedSecurityManagerassociated with the filter should be bound to static memory (viaSecurityUtils.setSecurityManager),falseotherwise.voidsetFilterOncePerRequest(boolean filterOncePerRequest)Sets whether the filter executes once per request or for every invocation of the filter.ShiroFilterConfigurationsetStaticSecurityManagerEnabled(boolean staticSecurityManagerEnabled)Sets if the constructedSecurityManagerassociated with the filter should be bound to static memory (viaSecurityUtils.setSecurityManager).
-
-
-
Method Detail
-
isFilterOncePerRequest
public boolean isFilterOncePerRequest()
Returnstrueif the filter should only execute once per request. If set tofalsethe filter will execute each time it is invoked.- Returns:
trueif this filter should only execute once per request.
-
setFilterOncePerRequest
public void setFilterOncePerRequest(boolean filterOncePerRequest)
Sets whether the filter executes once per request or for every invocation of the filter. It is recommended to leave this disabled if you are using aRequestDispatcherto forward or include request (JSP tags, programmatically, or via a framework).- Parameters:
filterOncePerRequest- Whether this filter executes once per request.
-
isStaticSecurityManagerEnabled
public boolean isStaticSecurityManagerEnabled()
Returnstrueif the constructedSecurityManagerassociated with the filter should be bound to static memory (viaSecurityUtils.setSecurityManager),falseotherwise. The default value isfalse.- Returns:
trueif the constructedSecurityManagerassociated with the filter should be bound to static memory (viaSecurityUtils.setSecurityManager),falseotherwise.- See Also:
- SHIRO-287
-
setStaticSecurityManagerEnabled
public ShiroFilterConfiguration setStaticSecurityManagerEnabled(boolean staticSecurityManagerEnabled)
Sets if the constructedSecurityManagerassociated with the filter should be bound to static memory (viaSecurityUtils.setSecurityManager). The default value isfalse.- Parameters:
staticSecurityManagerEnabled- if the constructedSecurityManagerassociated with the filter should be bound to static memory (viaSecurityUtils.setSecurityManager).- See Also:
- SHIRO-287
-
-