ServiceAPI Gateway
Routes API Gateway
Route map hiện tại của Go API Gateway cho auth và current-context.
Routes API Gateway
Route map đã dùng trong checkpoint
| Path | Method | Route id | Service name | Target | Trạng thái |
|---|---|---|---|---|---|
/healthz | GET | local | Gateway | local handler | Đã đóng |
/api/auth/login | POST | identity-auth | identity-service | Identity Service | Đã đóng |
/api/auth/refresh | POST | identity-auth | identity-service | Identity Service | Đã đóng |
/api/auth/select-branch | POST | identity-auth | identity-service | Identity Service | Đã đóng |
/api/workspaces/current-context | GET | entitlement-workspaces | entitlement-service | Entitlement Service | Reachable, Entitlement chưa đóng |
Source route registry:
| Route id | Pattern | Service name |
|---|---|---|
identity-auth | /api/auth/* | identity-service |
entitlement-workspaces | /api/workspaces/* | entitlement-service |
Auth routes
Gateway proxy auth routes tới Identity Service.
POST /api/auth/loginlà public route.POST /api/auth/refreshlà public route.POST /api/auth/select-branchcần account context theo route guard.
accountAccessToken dùng cho select branch, không dùng cho normal business APIs.
Current-context
GET /api/workspaces/current-context match route family:
/api/workspaces/*
→ route_id=entitlement-workspaces
→ service_name=entitlement-serviceTrạng thái: route reachable qua Gateway, nhưng Entitlement Service chưa đóng.
CORS
OPTIONSlà public request.- Preflight hợp lệ được xử lý local bởi Gateway.
- Preflight hợp lệ trả
204. - Preflight không proxy xuống downstream service.
Không document là closed
Gateway code có nhiều route patterns khác trong registry. Docs này không đánh dấu các route đó là closed nếu chưa có checkpoint/validation tương ứng.
TODO
- Chưa đóng: Gateway -> Entitlement E2E cho
GET /api/workspaces/current-context. - Chưa đóng: route docs cho các service khác sau khi có validation.