首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >shiro中的过滤器

shiro中的过滤器

作者头像
用户9006224
发布2022-12-21 08:56:57
发布2022-12-21 08:56:57
1.3K0
举报
文章被收录于专栏:cjz的专栏cjz的专栏
  • shiro框架内置了10个过滤器
  • 常见的如下
    • anon :有的资源(页面和方法)不登录也可以访问,那么这些资源我们可以配置成anon过滤器
    • authc:有的资源必须登录后才能访问,那么这些资源我们可以配置成authc过滤器
    • perms[“添加文章”] :这个资源必须当前登录人有“企业管理”权限才能访问

过滤器简称

相对应的java类

anon

org.apache.shiro.web.filter.authc.AnonymousFilter

authc

org.apache.shiro.web.filter.authc.FormAuthenticationFilter

authcBasic

org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter

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

logout

org.apache.shiro.web.filter.authc.LogoutFilter

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020-10-30,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档