Add admin API to list licenses and create product keys.

Expose GET /v1/admin/licenses and POST /v1/admin/product-keys for the license manager app.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-06-28 12:35:40 +08:00
parent d595f4ca5a
commit a6a0e8adf8
3 changed files with 285 additions and 91 deletions
+2
View File
@@ -56,6 +56,8 @@ npm test
- `GET /v1/status?sub=...``{ revoked: boolean }`.
- `POST /v1/admin/revoke``Authorization: Bearer <LICENSE_ADMIN_TOKEN>`, тело `{ "sub": "..." }`.
- `POST /v1/admin/issue` — админская выдача (`sub`, `pid`, `iat`, `exp`, `did`).
- `GET /v1/admin/licenses` — список продуктовых ключей с активациями и флагом `revoked`.
- `POST /v1/admin/product-keys` — создание нового продуктового ключа (`pid`, `maxDevices`, `expiresAtSec`, опционально `key`, `sub`).
- `GET /health``{ ok: true }`.
## Клиент