当前位置:网站首页>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方法
边栏推荐
猜你喜欢
随机推荐
QT——连接USB摄像头
Smart contract DAPP system development process technology
ThreadPoolExecutor是怎样执行任务的
27. Remove elements
A method to deal with the crash of C Halcon user control
实时流式协议--RTSP
UDF and analysis case of sparksql, 220725,
由浅入深搭建神经网络
Pengge C language - minesweeping 2021-08-16
菜鸟看源码之HashTable
242. Effective letter heteronyms
pytest 执行规则_基本用法_常用插件_常用断言_常用参数
菜鸟看源码之ArrayList
win10 1903 笔记本开热点出现蓝屏问题
承认吧 投新能源就是为了安全感
Linkedblockingqueue of novice source code
Bash shell学习笔记(四)
面试过程中,面试官是如何考察Rust工程师的水平?
logging基本使用
3dunity game project practice - first person shooting game









