feat(auth): 微信 session_key 迁移到 Redis — 内存降级兜底
session_key 从全局 HashMap 迁移到 Redis(SET key EX 300 / GETDEL), Redis 不可用时自动降级到内存缓存,提升多实例部署安全性。
This commit is contained in:
@@ -23,6 +23,7 @@ pub struct AuthState {
|
||||
pub default_tenant_id: Uuid,
|
||||
pub wechat_appid: String,
|
||||
pub wechat_secret: String,
|
||||
pub redis: Option<redis::Client>,
|
||||
}
|
||||
|
||||
/// Parse a human-readable TTL string (e.g. "15m", "7d", "1h", "900s") into seconds.
|
||||
|
||||
Reference in New Issue
Block a user