From 865a393d7b5e38208f36f51a5dbed01a47ad8c05 Mon Sep 17 00:00:00 2001 From: lik Date: Tue, 10 Nov 2026 15:58:06 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E5=A4=9A=E7=AB=AF?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E4=B8=8E=E8=AE=A2=E5=8D=95=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=90=E6=A8=A1=E5=9D=97=EF=BC=8C=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/user | 2 +- doc/architecture-overview.html | 8 ++++---- doc/plan.md | 2 +- ui/web_escort_admin | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/user b/api/user index d7d12bb..5fabb6b 160000 --- a/api/user +++ b/api/user @@ -1 +1 @@ -Subproject commit d7d12bb19a16c147a48a9847236332e4ee6cdef5 +Subproject commit 5fabb6ba864cb98fb2f04f487fefcaa5228b9a58 diff --git a/doc/architecture-overview.html b/doc/architecture-overview.html index 988cfdc..1a932a0 100644 --- a/doc/architecture-overview.html +++ b/doc/architecture-overview.html @@ -639,7 +639,7 @@ 鉴权 - token 单点在 user 服务,health 实时校验 + 进程内缓存 + token 多端会话在 user 服务(每端一条),health 实时校验 + 进程内缓存 改造成本低;代价是登出/锁定在 health 侧最多延迟 5 分钟 @@ -1427,9 +1427,9 @@ doc = findOneAndUpdate({ _id, status: "pending" }, { $set 可接受;后续引入 JWT 短 access + refresh 可改善 - 单 token - 管理端登录会把 C 端踢下线 - user_session 作为独立事项另行评估 + 多端会话(每端一条,上限 10 条) + 同一账号可多端同时在线,登录互不踢;超出上限时最早的会话被淘汰 + 已实现;如需按设备管理 / 强制下线,再引入 user_session 限流、微信 access_token、WS Agent 缓存均为进程内存态 diff --git a/doc/plan.md b/doc/plan.md index 3e5798c..bc1597c 100644 --- a/doc/plan.md +++ b/doc/plan.md @@ -87,7 +87,7 @@ | --- | --- | --- | --- | --- | | U1 | P4:停止写旧 `app`、删除字段、`strict: true` | `api/user/models/schema/user.js:74` 仍有 `app`,`:87` 仍为 `strict: false`;写入仍在双写 | P2 | multi-app P4 | | U2 | P5:下游完全切读 `apps` | health 侧 `permissions.js` 已优先读 `apps`,但仍保留旧 `app` 兜底;`web_tcm` 仍读 `app.tcm`(外部仓库) | P2 | multi-app P5 | -| U3 | 多端登录互踢 | 仍为单 token,管理端登录会把 C 端踢下线;`user_session` 未建 | 明确延后 | multi-app §6.2 / §12.3 | +| U3 | 多端登录互踢 | 已改为多端会话:`security.tokens` 每端一条 token 哈希(上限 10 条),登录互不覆盖;`token/tokenExpiry` 镜像最新会话兼容旧客户端 | 已完成 | multi-app §6.2 / §12.3 | | U4 | `unionid` 跨应用合并 | 依赖微信开放平台绑定后才有值;未绑定时退化为手机号 | 运营配置 | multi-app §10 | | U5 | 新应用 config 白名单 | `ttapp-escort` 等未配置 `APP_CONFIG_SCHEMAS`,写入会返回 400;接入前需补 | 接入前 | multi-app §6.7 | diff --git a/ui/web_escort_admin b/ui/web_escort_admin index f63c3fe..71cdbc5 160000 --- a/ui/web_escort_admin +++ b/ui/web_escort_admin @@ -1 +1 @@ -Subproject commit f63c3fe216a832562ded01d49beeb11bd294e012 +Subproject commit 71cdbc57a19232f9cdf8952af5dd291a56600989