wip: 临时提交

This commit is contained in:
Ray.Hao
2025-03-07 21:39:51 +08:00
parent a84f2b9988
commit e01b784a97
13 changed files with 288 additions and 175 deletions

View File

@@ -72,24 +72,19 @@ mybatis-plus:
# 安全配置
security:
session:
# 会话方式,支持 jwt、redis-token
type: jwt
jwt:
# JWT 秘钥
key: SecretKey012345678901234567890123456789012345678901234567890123456789
# 访问令牌 有效期(单位:秒),默认 1 小时,-1 表示永不过期
access-token-time-to-live: 3600
# 刷新令牌有效期(单位:秒),默认 7 天,-1 表示永不过期
refresh-token-time-to-live: 604800
# 无需认证的请求路径
redis-token:
# 是否允许多点登录true:允许 false:不允许
multi-login: false
# 访问令牌有效期(单位:秒),默认 1 小时
access-token-time-to-live: 3600
# 刷新令牌有效期(单位:秒),默认 7 天
refresh-token-time-to-live: 604800
# 认证策略核心配置
auth:
type: jwt # 认证策略 [jwt|redis-token]
access-token-ttl: 3600 # 访问令牌 有效期(单位:秒),默认 1 小时,-1 表示永不过期
refresh-token-ttl: 604800 # 刷新令牌有效期(单位:秒),默认 7 天,-1 表示永不过期
# JWT 认证配置
jwt:
key: SecretKey012345678901234567890123456789012345678901234567890123456789 # JWT密钥(HS256算法至少32字符RS256至少2048位)
# Redis Token 认证配置
redis-token:
max-sessions: 1 # 最大允许多个设备同时登录的数量默认为1
session-control: REVOKE_OLDEST # 会话超限处理策略 [REJECT|REVOKE_OLDEST|REVOKE_ALL]
# 白名单路径
ignore-urls:
- /api/v1/auth/login/** # 登录接口(账号密码登录、手机验证码登录和微信登录)
- /api/v1/auth/captcha # 验证码获取接口
@@ -103,7 +98,6 @@ security:
- /v3/api-docs/**
- /webjars/**
# 文件存储配置
oss:
# OSS 类型 (目前支持aliyun、minio、local)