Files
archery-event-docs/09-后台API说明/认证与鉴权方案.md
2026-04-07 16:15:59 +08:00

27 lines
916 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 认证与鉴权方案
## 1. 文档目标
统一描述用户、商户、平台三类身份的登录认证和接口鉴权方式。
## 2. 身份类型
| 身份 | 来源端 | 说明 |
| --- | --- | --- |
| 用户 | 微信小程序 | 通过微信登录获取身份 |
| 商户账号 | 商户后台 | 使用账号密码或验证码登录 |
| 平台账号 | 管理后台 | 平台内部账号登录 |
## 3. 鉴权建议
- 登录成功后签发统一 token。
- token 中需包含身份类型、用户ID、角色信息。
- 后端根据角色与资源进行权限校验。
- 高风险接口需二次校验或更严格的权限控制。
## 4. 安全要求
- token 失效与刷新机制要明确。
- 敏感操作要有审计日志。
- 管理后台和商户后台建议支持强密码策略或 MFA如后续需要
## 5. 待确认项
- 是否统一采用 JWT。
- 是否引入 RBAC 或更细粒度权限模型。