Package org.apache.shiro.web.config
Class ShiroFilterConfiguration
java.lang.Object
org.apache.shiro.web.config.ShiroFilterConfiguration
Configuration for Shiro's root level servlet filter.
- Since:
- 1.10.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the filter should only execute once per request.booleanReturnstrueif 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.setStaticSecurityManagerEnabled(boolean staticSecurityManagerEnabled) Sets if the constructedSecurityManagerassociated with the filter should be bound to static memory (viaSecurityUtils.setSecurityManager).
-
Constructor Details
-
ShiroFilterConfiguration
public ShiroFilterConfiguration()
-
-
Method Details
-
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
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
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:
-
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:
-