chore: JWT 访问令牌和刷新令牌合理调整

This commit is contained in:
Ray.Hao
2025-04-03 11:22:22 +08:00
parent e7dfdabe3c
commit 86c31498ea
2 changed files with 2 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ mybatis-plus:
security:
session:
type: jwt # 会话方式 jwt/redis-token
access-token-time-to-live: 60 # 访问令牌 有效期(单位:秒),默认 1 小时,-1 表示永不过期
access-token-time-to-live: 7200 # 访问令牌 有效期(单位:秒),默认 2 小时,-1 表示永不过期
refresh-token-time-to-live: 604800 # 刷新令牌有效期(单位:秒),默认 7 天,-1 表示永不过期
jwt:
secret-key: SecretKey012345678901234567890123456789012345678901234567890123456789 # JWT密钥(HS256算法至少32字符)

View File

@@ -72,7 +72,7 @@ mybatis-plus:
security:
session:
type: jwt # 会话方式 [jwt|redis-token]
access-token-time-to-live: 3600 # 访问令牌 有效期(单位:秒),默认 1 小时,-1 表示永不过期
access-token-time-to-live: 7200 # 访问令牌 有效期(单位:秒),默认 2 小时,-1 表示永不过期
refresh-token-time-to-live: 604800 # 刷新令牌有效期(单位:秒),默认 7 天,-1 表示永不过期
jwt:
secret-key: SecretKey012345678901234567890123456789012345678901234567890123456789 # JWT密钥(HS256算法至少32字符)