feat(auth): 添加用户权限获取接口并完善JWT令牌角色信息

- 在JWT令牌中添加用户角色信息
- 新增get_my_permissions接口用于获取当前用户权限码列表
- 重构认证回调逻辑,增加错误日志记录
- 更新用户信息获取接口使用Authorization头验证
```
This commit is contained in:
2026-04-06 00:40:08 +08:00
parent dfa8fa62a8
commit f1f8518985
71 changed files with 9402 additions and 191 deletions
+4 -4
View File
@@ -23,7 +23,7 @@ services:
- ../backend/static:/app/static
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 3
@@ -71,7 +71,6 @@ services:
- SECRET_KEY=${SECRET_KEY}
volumes:
- ../backend/logs:/app/logs
- ../backend/celerybeat-schedule:/app/celerybeat-schedule
depends_on:
- backend
restart: unless-stopped
@@ -83,9 +82,10 @@ services:
dockerfile: Dockerfile
container_name: h3c-onu-ms-frontend
ports:
- "8081:80"
- "5173:5173"
environment:
- VITE_API_BASE_URL=${VITE_API_BASE_URL:-http://localhost:8001}
- VITE_API_PROXY_TARGET=http://backend:8000
- VITE_CASDOOR_ENDPOINT=${VITE_CASDOOR_ENDPOINT}
- VITE_CASDOOR_CLIENT_ID=${VITE_CASDOOR_CLIENT_ID}
- VITE_CASDOOR_ORG_NAME=${VITE_CASDOOR_ORG_NAME}
@@ -94,7 +94,7 @@ services:
- backend
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
test: ["CMD", "wget", "-qO-", "http://localhost:5173"]
interval: 30s
timeout: 10s
retries: 3