当前位置:网站首页>AuthorizingRealm简介说明
AuthorizingRealm简介说明
2022-07-26 10:56:00 【qq_25073223】
转自:
下文笔者将讲述AuthorizingRealm的相关简介说明,如下所示
shiro中设置realm通常会继承AuthorizingRealm 并实现getAuthenticationInfo和getAuthorizationInfo方法 来完成登录和权限的验证 GetAuthorizationInfo
该方法主要是用于当前登录用户授权
1.调用SecurityUtils.getSubject().isPermitted(String str)方法时会调用
2.在@Controller 上@RequiresRoles("admin")在方法上加注解的时候调用
3.[@shiro.hasPermission name = "admin"][/@shiro.hasPermission]或
<shiro:hasPermission name="admin"></shiro:hasPermission>
在页面上加shiro标签的时候,即进这个页面的时候扫描到有这个标签的时候调用
GetAuthenticationInfo
该方法是进行用户验证的。
调用currUser.login(token)方法时会调用doGetAuthenticationInfo方法
边栏推荐
猜你喜欢
随机推荐
LinkedList of source code
104. Maximum depth of binary tree
MFC picture control
232. Implement queue with stack
Traversal recursion + iteration of binary tree
Le audio specification overview
Wechat official account development obtains openid times error 40029 invalid code solution
WinPcap packet capturing function pcap_ Loop (), stop the problem
微信公众号消息通知 “errcode“:40164,“errmsg“:“invalid ip
easyui04
ThreadPoolExecutor是怎样执行任务的
C notes
Bash shell学习笔记(六)
35. Search the insertion position
MySQL数据库的简单使用
Wireshark basic tutorial Ethernet frame analysis.
LE Audio规范概述
Drbl diskless startup + Clonezilla network backup and restore system
Classified by the number of 1 in binary number
ESXi6.5补丁更新








