当前位置:网站首页>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方法
边栏推荐
- Analysis of C # delegation and anonymous method
- UDF and analysis case of sparksql, 220725,
- 像素和内存的关系
- mysql学习笔记
- 104. Maximum depth of binary tree
- 35. Search the insertion position
- Interview knowledge points
- Bash shell学习笔记(三)
- Shell script fails to execute repeatedly automatically
- The combination of pytest confitest.py and fixture
猜你喜欢
随机推荐
Sword finger offer (V): queue with two stacks
微信公众号消息通知 “errcode“:40164,“errmsg“:“invalid ip
Att request of ble
ArrayList of novice source code
232. Implement queue with stack
List ascending and descending
SparseArray of the source code for novices
Basic use of logging
104. Maximum depth of binary tree
35. Search the insertion position
ISO 639:1988 : Code for the representation of names of languages
Traversal recursion + iteration of binary tree
Pytest case execution sequence
Classified by the number of 1 in binary number
Bash shell learning notes (III)
Implementing queues with two stacks
静态路由和动态路由
1837. Sum of digits under k-ary representation
Bash shell学习笔记(四)
Smart contract DAPP system development process technology