Implement CHIS login flow
This commit is contained in:
@@ -106,3 +106,12 @@
|
||||
- 阻塞:无。
|
||||
- 决策:T-003 后标准测试入口改为 `python -m pytest`;保留既有 unittest 风格测试,pytest 可正常收集运行。
|
||||
- 下一步:T-101 迁移 CHIS 登录链路。
|
||||
|
||||
## 2026-07-04 T-101 迁移 CHIS 登录链路
|
||||
|
||||
- 状态:DONE
|
||||
- 变更:新增 `app/chis/auth.py` 和 `app/chis/crypto.py`;新增 `tests/test_chis_auth.py`;`requirements.txt` 增加 `requests[socks]==2.32.4`、`gmssl==3.2.2`;更新任务看板、技术栈、架构、API 合约、当前状态和根目录任务总览。
|
||||
- 验证:先执行 `python -m pytest tests/test_chis_auth.py` 看到 `ModuleNotFoundError: No module named 'app.chis.auth'`;新增依赖测试后执行 `python -m pytest tests/test_project_setup.py` 看到 `requests[socks]==2.32.4` 未固定;补充 host 兼容测试时先看到 `assert 'chis.example.test:9002/chis' == 'http://chis.example.test:9002/chis'`;实现后执行 `python -m pytest tests/test_chis_auth.py` 结果 `6 passed`,执行 `python -m pytest tests/test_project_setup.py` 结果 `1 passed`,执行 `python -m pip install -r requirements.txt` 显示 Flask、pytest、requests、gmssl 均已满足,执行 `python -m pytest` 结果 `10 passed`,临时启动 `python run.py` 后请求 `/health` 返回 `{"ok":true}`,执行 `git diff --check` 未发现空白错误。
|
||||
- 阻塞:无。
|
||||
- 决策:T-101 只迁移登录链路,不接 Redis,不做会话有效性查询;登录客户端从 `CHIS_BASE_URL`、`CHIS_PUBLIC_KEY`、`CHIS_PROXY` 创建,完成 `myRoles`、角色选择、`myApps`、JSESSIONID 提取和 cookie 组装。
|
||||
- 下一步:T-102 接入账号信息查询验证会话。
|
||||
|
||||
Reference in New Issue
Block a user