Shiro的默认过滤器

在web应用中,Shiro会自动创建一些有用的默认Filter的实例,并且这些实例可以通过Shiro指定的名称在ini配置文件的[main]区域中直接可用。

Shiro将默认Filter的名字定义在DefaultFilter enum中,以下就是所有的Filter:

Filter NameClass
anon org.apache.shiro.web.filter.authc.AnonymousFilter
authc org.apache.shiro.web.filter.authc.FormAuthenticationFilter
authcBasic org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter
logout org.apache.shiro.web.filter.authc.LogoutFilter
noSessionCreation org.apache.shiro.web.filter.session.NoSessionCreationFilter
perms org.apache.shiro.web.filter.authz.PermissionsAuthorizationFilter
port org.apache.shiro.web.filter.authz.PortFilter
rest org.apache.shiro.web.filter.authz.HttpMethodPermissionFilter
roles org.apache.shiro.web.filter.authz.RolesAuthorizationFilter
ssl org.apache.shiro.web.filter.authz.SslFilter
user org.apache.shiro.web.filter.authc.UserFilter

其中的Filter类会在后面慢慢细讲,此处暂时略过。

 

posted @ 2018-07-06 20:37  orange_ven  阅读(869)  评论(0)    收藏  举报