chore: JWT 访问令牌和刷新令牌合理调整
This commit is contained in:
@@ -74,7 +74,7 @@ mybatis-plus:
|
|||||||
security:
|
security:
|
||||||
session:
|
session:
|
||||||
type: jwt # 会话方式 jwt/redis-token
|
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 表示永不过期
|
refresh-token-time-to-live: 604800 # 刷新令牌有效期(单位:秒),默认 7 天,-1 表示永不过期
|
||||||
jwt:
|
jwt:
|
||||||
secret-key: SecretKey012345678901234567890123456789012345678901234567890123456789 # JWT密钥(HS256算法至少32字符)
|
secret-key: SecretKey012345678901234567890123456789012345678901234567890123456789 # JWT密钥(HS256算法至少32字符)
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ mybatis-plus:
|
|||||||
security:
|
security:
|
||||||
session:
|
session:
|
||||||
type: jwt # 会话方式 [jwt|redis-token]
|
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 表示永不过期
|
refresh-token-time-to-live: 604800 # 刷新令牌有效期(单位:秒),默认 7 天,-1 表示永不过期
|
||||||
jwt:
|
jwt:
|
||||||
secret-key: SecretKey012345678901234567890123456789012345678901234567890123456789 # JWT密钥(HS256算法至少32字符)
|
secret-key: SecretKey012345678901234567890123456789012345678901234567890123456789 # JWT密钥(HS256算法至少32字符)
|
||||||
|
|||||||
Reference in New Issue
Block a user