v1.10.0 版本更新, 提供会话治理接口

This commit is contained in:
shengzhang
2021-01-09 01:24:37 +08:00
parent 2328f9d654
commit f26424537f
21 changed files with 89 additions and 36 deletions

View File

@@ -1,11 +1,11 @@
<p align="center">
<img alt="logo" src="https://gitee.com/sz6/sa-token/raw/master/sa-token-doc/doc/logo.png" width="150" height="150" style="margin-bottom: 10px;">
</p>
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">sa-token v1.9.0</h1>
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">sa-token v1.10.0</h1>
<h4 align="center">一个JavaWeb轻量级权限认证框架功能全面上手简单</h4>
<h4 align="center">
<a href="https://gitee.com/sz6/sa-token/stargazers"><img src="https://gitee.com/sz6/sa-token/badge/star.svg"></a>
<a href="https://github.com/click33/sa-token"><img src="https://img.shields.io/badge/sa--token-v1.9.0-2B9939"></a>
<a href="https://github.com/click33/sa-token"><img src="https://img.shields.io/badge/sa--token-v1.10.0-2B9939"></a>
<a href="https://github.com/click33/sa-token/stargazers"><img src="https://img.shields.io/github/stars/click33/sa-token"></a>
<a href="https://github.com/click33/sa-token/watchers"><img src="https://img.shields.io/github/watchers/click33/sa-token"></a>
<a href="https://github.com/click33/sa-token/network/members"><img src="https://img.shields.io/github/forks/click33/sa-token"></a>
@@ -77,7 +77,7 @@ sa-token的API众多请恕此处无法为您逐一展示更多示例请戳
## 涵盖功能
- **登录验证** —— 轻松登录鉴权,并提供五种细分场景值
- **权限验证** —— 拦截违规调用,不同角色不同授权
- **权限验证** —— 适配RBAC模型,不同角色不同授权
- **Session会话** —— 专业的数据缓存中心
- **踢人下线** —— 将违规用户立刻清退下线
- **模拟他人账号** —— 实时操作任意用户状态数据
@@ -89,6 +89,7 @@ sa-token的API众多请恕此处无法为您逐一展示更多示例请戳
- **自动续签** —— 提供两种token过期策略灵活搭配使用还可自动续签
- **同端互斥登录** —— 像QQ一样手机电脑同时在线但是两个手机上互斥登录
- **组件自动注入** —— 零配置与Spring等框架集成
- **会话治理** —— 提供方便灵活的会话查询接口
- **更多功能正在集成中...** —— 如有您有好想法或者建议,欢迎加群交流

View File

@@ -7,7 +7,7 @@
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="keywords" content="sa-token|sa-token框架|sa-token文档|sa-token在线文档|权限认证框架">
<meta name="description" content="sa-token是一个JavaWeb权限认证框架功能全面上手简单登录验证、权限验证、Session会话、踢人下线、集成Redis、前后台分离、模拟他人账号、多账号体系、注解式鉴权、花式token、自动续签、同端互斥登录、Spring集成...,零配置开箱即用,覆盖所有应用场景,你所需要的功能,这里都有">
<meta name="description" content="sa-token是一个JavaWeb权限认证框架功能全面上手简单登录验证、权限验证、Session会话、踢人下线、集成Redis、前后台分离、模拟他人账号、多账号体系、注解式鉴权、花式token、自动续签、同端互斥登录、会话治理、Spring集成...,零配置开箱即用,覆盖所有应用场景,你所需要的功能,这里都有">
<link rel="stylesheet" href="https://unpkg.zhimg.com/docsify@4.11.3/lib/themes/vue.css">
<link rel="stylesheet" href="./lib/index.css">
<link rel="shortcut icon" type="image/x-icon" href="logo.png">
@@ -38,7 +38,7 @@
</div>
<script>
var name = '<img style="width: 50px; height: 50px; vertical-align: middle;" src="logo.png" alt="logo" /> ';
name += '<b style="font-size: 24px; vertical-align: middle;">sa-token</b> <sub>v1.9.0</sub>'
name += '<b style="font-size: 24px; vertical-align: middle;">sa-token</b> <sub>v1.10.0</sub>'
window.$docsify = {
name: name, // 名字
repo: 'https://github.com/click33/sa-token', // github地址

View File

@@ -1,5 +1,11 @@
# 更新日志
### 2021-1-6 @v1.10.0
- 新增:提供查询所有会话方案 **[重要]**
- 修复修复token设置为永不过期时无法正常被顶下线的bug感谢github用户 @zjh599245299 提出的bug
### 2021-1-6 @v1.9.0
- 优化:`spring-boot-starter-data-redis``2.3.7.RELEASE` 改为 `2.3.3.RELEASE`
- 修复:补上注解拦截器里漏掉验证`@SaCheckRole`的bug

View File

@@ -9,7 +9,7 @@
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-spring-boot-starter</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
</dependency>
```

View File

@@ -18,7 +18,7 @@
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-spring-boot-starter</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
</dependency>
```

View File

@@ -11,7 +11,7 @@
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-dao-redis</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
</dependency>
```
优点兼容性好缺点session序列化后基本不可读对开发者来讲等同于乱码
@@ -23,7 +23,7 @@
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-dao-redis-jackson</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
</dependency>
```
优点session序列化后可读性强可灵活手动修改缺点兼容性稍差

View File

@@ -14,6 +14,7 @@ StpUtil.getSession(); // 获取当前账号id的Session (
StpUtil.getSession(true); // 获取当前账号id的Session, 并决定在Session尚未创建时是否新建并返回
StpUtil.getSessionByLoginId(10001); // 获取账号id为10001的Session
StpUtil.getSessionByLoginId(10001, true); // 获取账号id为10001的Session, 并决定在Session尚未创建时是否新建并返回
StpUtil.getSessionBySessionId("xxxx-xxxx"); // 获取SessionId为xxxx-xxxx的Session, 在Session尚未创建时, 返回null
```