feat(sso): MaxKey/JNPF/uc 迁移 P0 修复

- /sign/api/oauth/v20/me 归一化盲区:补 /api/oauth/v20/me 路由别名
- scope 逗号+空白切分(authorize 与 has_openid 同口径,避免逗号串吞 id_token)
- mobile 身份字段走 User.extra 全链(check_mobile/create/set_profile/claims/me),
  me 补 MaxKey 别名字段 id/userId/displayName/fullName
- 单点注销:/logout、/sign/logout 别名 + redirect_uri 302 回跳
  (client 白名单,未登记 400;302 同时清会话 cookie)
- 管理员重置密码入口统一过 accounts::check_password
- e2e 互通套新增 A2b/A2c/A2d/A2e/A8b 六条断言,六套回归 rc=0
This commit is contained in:
ssw committed 2026-09-13 22:06:12 +08:00
1 parent 71809a4090
commit 6409d42817
5 files changed
+148 -10

No files matched your search

+12
View File
@@ -177,3 +177,15 @@
> 顺带的收益:iPass 与 SSO 原先各有一份 `oauth.rs`(差异 425 行)、`users.rs`(525 行)、
> `models.rs`(234 行),内核化后只保留一份。
> 架构论证(为什么不拆多 .so)见 `docs/plugin-architecture-analysis.md`。
## [x] v3:MaxKey/JNPF/uc 迁移 P0 补齐(2026-09-13 完成)
> 背景与逐项依据:`docs/maxkey-to-ipass-migration-gap.md`(§0.5 执行状态表)。
- [x] `/sign/api/oauth/v20/me` 路由别名(MaxKey 真实 userinfo 路径,归一化盲区 404)
- [x] scope 逗号+空白切分(authorize 校验与 `has_openid` 同口径;逗号串原先直接 invalid_scope 且吞 id_token)
- [x] `mobile` 身份字段(`User.extra` 通道,check_mobile 校验,create/set_profile/管理台/claims/me 全链)
- [x] me 响应 MaxKey 别名字段:`id`/`userId`/`displayName`/`fullName`(uc 按 maxkey_user_id 建档依赖)
- [x] 单点注销:`/logout`、`/sign/logout` 别名 + `redirect_uri` 302 回跳(client 白名单,未登记 400;302 同时清会话 cookie)
- [x] 管理员重置密码入口统一过 `check_password`(原可绕过插件层 8 位策略)
- [x] e2e:互通套新增 A2b/A2c/A2d/A2e/A8b 六条断言,六套 rc=0