docs: note current auth routing
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
### 1.1 约定
|
||||
|
||||
- 当前实现使用 `/v1` 与 `/super/v1`,多租户前缀待统一改造
|
||||
- 租户前缀:`/t/:tenant_code/`(不区分大小写;服务端统一按 `lower()` 识别)
|
||||
- API:`/t/:tenant_code/v1/...`
|
||||
- Admin SPA:`/t/:tenant_code/admin/...`
|
||||
@@ -54,11 +55,13 @@
|
||||
### 4.2 API baseURL 与 Cookie
|
||||
|
||||
- axios `baseURL = "/t/<tenant_code>/v1"`
|
||||
- `withCredentials = true`(携带 cookie 会话)
|
||||
- `withCredentials = true`(历史 WeChat 方案)
|
||||
- 当前实现改为 JWT:`Authorization: Bearer <token>`
|
||||
|
||||
### 4.3 未登录跳转
|
||||
|
||||
- 401 时跳:`/t/<tenant_code>/v1/auth/wechat?redirect=<encodeURIComponent(currentUrl)>`
|
||||
- 当前实现为 OTP 登录,不走微信授权回调
|
||||
|
||||
---
|
||||
|
||||
@@ -77,4 +80,3 @@
|
||||
- 统一格式:`quyun/<tenant_uuid>/<md5>.<ext>`
|
||||
- `tenant_uuid` 来自 `tenants.tenant_uuid`
|
||||
- `md5` 来自上传文件内容 hash
|
||||
|
||||
|
||||
Reference in New Issue
Block a user