mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-04-05 17:37:53 +08:00
v1.24.0 更新
This commit is contained in:
parent
d4493d0f98
commit
3372cf190e
README.mdpom.xml
sa-token-core
sa-token-demo
sa-token-demo-alone-redis
sa-token-demo-jwt
sa-token-demo-oauth2-client
sa-token-demo-oauth2-server
sa-token-demo-quick-login
sa-token-demo-solon
sa-token-demo-springboot
sa-token-demo-sso1
sa-token-demo-sso2-client
sa-token-demo-sso2-server
sa-token-demo-sso3-client
sa-token-demo-sso3-server
sa-token-demo-webflux
sa-token-doc
doc
index.htmlsa-token-plugin
pom.xml
sa-token-alone-redis
sa-token-dao-redis-jackson
sa-token-dao-redis
sa-token-oauth2
sa-token-quick-login
sa-token-spring-aop
sa-token-temp-jwt
sa-token-starter
@ -1,7 +1,7 @@
|
||||
<p align="center">
|
||||
<img alt="logo" src="https://gitee.com/dromara/sa-token/raw/master/sa-token-doc/doc/logo.png" width="150" height="150">
|
||||
</p>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">Sa-Token v1.23.0</h1>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">Sa-Token v1.24.0</h1>
|
||||
<h4 align="center">这可能是史上功能最全的 Java 权限认证框架!</h4>
|
||||
<p align="center">
|
||||
<a href="https://gitee.com/dromara/sa-token/stargazers"><img src="https://gitee.com/dromara/sa-token/badge/star.svg"></a>
|
||||
|
4
pom.xml
4
pom.xml
@ -8,7 +8,7 @@
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
|
||||
<!-- 项目介绍 -->
|
||||
<name>sa-token</name>
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
<!-- 一些属性 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
<jdk.version>1.8</jdk.version>
|
||||
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>utf-8</project.reporting.outputEncoding>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-parent</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -13,7 +13,7 @@ public class SaTokenConsts {
|
||||
/**
|
||||
* Sa-Token 当前版本号
|
||||
*/
|
||||
public static final String VERSION_NO = "v1.23.0";
|
||||
public static final String VERSION_NO = "v1.24.0";
|
||||
|
||||
/**
|
||||
* Sa-Token 开源地址
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<java.version>1.8</java.version>
|
||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<java.version>1.8</java.version>
|
||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<!-- 定义sa-token版本号 -->
|
||||
<properties>
|
||||
<sa-token-version>1.23.0</sa-token-version>
|
||||
<sa-token-version>1.24.0</sa-token-version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<p align="center">
|
||||
<img alt="logo" src="https://gitee.com/dromara/sa-token/raw/master/sa-token-doc/doc/logo.png" width="150" height="150">
|
||||
</p>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">Sa-Token v1.23.0</h1>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">Sa-Token v1.24.0</h1>
|
||||
<h4 align="center">这可能是史上功能最全的 Java 权限认证框架!</h4>
|
||||
<p align="center">
|
||||
<a href="https://gitee.com/dromara/sa-token/stargazers"><img src="https://gitee.com/dromara/sa-token/badge/star.svg"></a>
|
||||
|
@ -29,7 +29,7 @@
|
||||
- [全局侦听器](/up/global-listener)
|
||||
- [全局过滤器](/up/global-filter)
|
||||
- [多账号验证](/up/many-account)
|
||||
- [微服务](/senior/dcs)
|
||||
<!-- - [微服务](/senior/dcs) -->
|
||||
|
||||
- **单点登录**
|
||||
- [单点登录简述](/sso/readme)
|
||||
@ -47,7 +47,7 @@
|
||||
- **微服务**
|
||||
- [分布式Session会话](/micro/dcs-session)
|
||||
- [网关统一鉴权](/micro/gateway-auth)
|
||||
- [内部服务调用鉴权](/micro/id-token)
|
||||
- [服务内部调用鉴权](/micro/id-token)
|
||||
- [依赖引入说明](/micro/import-intro)
|
||||
|
||||
- **插件**
|
||||
@ -55,6 +55,7 @@
|
||||
- [临时Token验证](/plugin/temp-token)
|
||||
- [Quick-Login快速登录插件](/plugin/quick-login)
|
||||
- [Alone独立Redis插件](/plugin/alone-redis)
|
||||
- [持久层扩展](/plugin/dao-extend)
|
||||
|
||||
- **其它**
|
||||
- [更新日志](/more/update-log)
|
||||
|
@ -21,6 +21,7 @@
|
||||
<nav>
|
||||
<select onchange="location.href=this.value">
|
||||
<option value="http://sa-token.dev33.cn/doc/index.html">最新版</option>
|
||||
<option value="http://sa-token.dev33.cn/v/v1.23.0/doc/index.html">v1.23.0</option>
|
||||
<option value="http://sa-token.dev33.cn/v/v1.22.0/doc/index.html">v1.22.0</option>
|
||||
<option value="http://sa-token.dev33.cn/v/v1.21.0/doc/index.html">v1.21.0</option>
|
||||
<option value="http://sa-token.dev33.cn/v/v1.20.0/doc/index.html">v1.20.0</option>
|
||||
@ -52,7 +53,7 @@
|
||||
<div id="app">加载中...</div>
|
||||
</div>
|
||||
<script>
|
||||
var saTokenTopVersion = '1.23.0'; // Sa-Token最新版本
|
||||
var saTokenTopVersion = '1.24.0'; // Sa-Token最新版本
|
||||
var name = '<img style="width: 60px; height: 60px; vertical-align: middle;" src="logo.png" alt="logo" /> ';
|
||||
name += '<b style="font-size: 28px; vertical-align: middle;">Sa-Token</b> <sub>v' + saTokenTopVersion + '</sub>'
|
||||
window.$docsify = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
# 微服务 - 内部服务调用鉴权
|
||||
# 微服务 - 服务内部调用鉴权
|
||||
|
||||
---
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
1. 物理隔离:子服务部署在指定的内网环境中,只有网关对外网开放
|
||||
2. 逻辑隔离:子服务与网关同时暴露在外网,但是子服务会有一个权限拦截层保证只接受网关发送来的请求,绕过网关直接访问子服务会被提示:无效请求
|
||||
|
||||
这种鉴权需求牵扯到两个环节:网关转发鉴权、内部服务调用鉴权
|
||||
这种鉴权需求牵扯到两个环节:网关转发鉴权、服务内部调用鉴权
|
||||
|
||||
Sa-Token提供两种解决方案:
|
||||
1. 使用 OAuth2.0 模式的凭证式,将 Client-Token 用作各个服务的身份凭证进行权限校验
|
||||
@ -120,7 +120,7 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
||||
> 如果通过网关转发,可以正常访问,直接访问子服务会提示:`无效Id-Token:xxx`
|
||||
|
||||
|
||||
### 三、内部服务调用鉴权
|
||||
### 三、服务内部调用鉴权
|
||||
|
||||
有时候我们需要在一个服务调用另一个服务的接口,这也是需要添加`Id-Token`作为身份凭证的
|
||||
|
||||
|
@ -1,6 +1,16 @@
|
||||
# 更新日志
|
||||
|
||||
|
||||
### 2021-7-24 @v1.24.0
|
||||
- 修复:修复部分场景下Alone-Redis插件导致项目无法启动的问题
|
||||
- 优化:增加对SpringBoot1.x版本的兼容性
|
||||
- 新增:SaOAuth2Util新增checkScope函数,用于校验令牌是否具备指定权限
|
||||
- 新增:OAuth2.0模块新增revoke接口,用于提前回收 Access-Token 令牌
|
||||
- 新增:新增`Sa-Id-Token` 模块,解决微服务内部调用鉴权 **[重要]**
|
||||
- 文档:新增OAuth2.0模块常用方法说明
|
||||
- 优化:大幅度优化文档示例
|
||||
|
||||
|
||||
### 2021-7-19 @v1.23.0
|
||||
- 新增:Sa-Token-OAuth2 模块正式发布 **[重要]**
|
||||
- 修复:修复jwt集成demo无法正确注册StpLogic的bug
|
||||
|
22
sa-token-doc/doc/plugin/dao-extend.md
Normal file
22
sa-token-doc/doc/plugin/dao-extend.md
Normal file
@ -0,0 +1,22 @@
|
||||
# 持久层扩展
|
||||
---
|
||||
|
||||
对于权限框架来讲,最容易碰到的扩展点便是数据存储方式,为了方便对接不同的缓存中间件,Sa-Token将所有数据持久化操作抽象到SaTokenDao接口,
|
||||
开发者要对接不同的平台只需要实现此接口即可,接口签名:[SaTokenDao.java](https://gitee.com/dromara/sa-token/blob/dev/sa-token-core/src/main/java/cn/dev33/satoken/dao/SaTokenDao.java)
|
||||
|
||||
框架已提供的集成包包括:
|
||||
|
||||
- 默认方式:储存在内存中,位于core核心包
|
||||
- sa-token-dao-redis:Redis集成包,使用jdk默认序列化方式
|
||||
- sa-token-dao-redis-jackson:Redis集成包,使用jackson序列化方式
|
||||
|
||||
有关Redis集成,详细参考:[集成Redis](/up/integ-redis),更多存储方式欢迎提交PR
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ Sa-token默认将数据保存在内存中,此模式读写速度最快,且避
|
||||
|
||||
**1. 无论使用哪种序列化方式,你都必须为项目提供一个Redis实例化方案,例如:**
|
||||
``` xml
|
||||
<!-- 提供redis连接池 -->
|
||||
<!-- 提供Redis连接池 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
|
@ -46,7 +46,7 @@
|
||||
<div class="content-box">
|
||||
<div class="fenge"></div>
|
||||
<!-- <img class="title-logo" src="./doc/logo.png" onclick="alert('别点我, 快去点star!')"> -->
|
||||
<h1>Sa-Token<small>v1.23.0</small></h1>
|
||||
<h1>Sa-Token<small>v1.24.0</small></h1>
|
||||
<div class="sub-title"> 这可能是史上功能最全的java权限认证框架!</div>
|
||||
<div class="btn-box">
|
||||
<a href="https://github.com/dromara/sa-token" target="_blank">GitHub</a>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-parent</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-plugin</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-plugin</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-plugin</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-plugin</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-plugin</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-plugin</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-plugin</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-parent</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-starter</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-starter</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-starter</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-starter</artifactId>
|
||||
<version>1.23.0</version>
|
||||
<version>1.24.0</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user