feat(auth): 改进刷新令牌机制

- 在 JWT 中添加 tokenType 字段,用于区分访问令牌和刷新令牌
- 重新实现刷新令牌验证逻辑,增加 tokenType 校验
- 优化 refreshToken 方法,直接使用 validateRefreshToken进行验证
- 移除不必要的代码,提高代码可读性和维护性
This commit is contained in:
Theo
2025-06-13 17:15:31 +08:00
parent 7ecf34cf43
commit 2af4581f2d
3 changed files with 78 additions and 44 deletions

View File

@@ -10,6 +10,11 @@ package com.youlai.boot.common.constant;
*/
public interface JwtClaimConstants {
/**
* 令牌类型
*/
String TOKEN_TYPE = "tokenType";
/**
* 用户ID
*/