shiro 简介
Apache Shiro Features
Shiro核心
Authentication: (认证) 调用Subject.login 进行登录,登录后的用户就是认证用户
Authorization: (授权) 这是一个访问控制器, ‘谁’ 可以访问 ‘什么’
Session Management: (会话管理) 管理用户定义的session , 即使不在web或者ejb应用程序中
Cryptography: (加密) Keeping data secure using cryptographic algorithms while still being easy to use.
shiro 扩展
Web Support (web 支持) 可以集成到web环境
Cache (缓存)
shiro 基本流程
Subject:
主体, 代表当前操作的用户
在Subject中所有和安全有关的操作,都需要和 SecurityManager 进行交互
SecurityManager:
安全管理器,它管理所有的Subject,
Realms:
安全数据源
可以从ini,db,ldap 或者你自己定义的数据源中获取用户数据
参考:
说明 英文好的同学可以直接去看官方的基本介绍和流程. 更加全面
- 官方介绍: https://shiro.apache.org/introduction.html
- 官方流程: https://shiro.apache.org/architecture.html