feat: licensing API phase 2 — validation, signed downloads, management, tier admin #660
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #622, #623, #624, #627
Phase 2-3 of the DLID licensing system:
API Endpoints (routers/api/v1/licensing/)
GET /validate— public DLID validation with reason codesGET /{dlid}/status— authenticated full license detailGET /download/{product}/{version}.zip— ed25519 signed downloads (5-min TTL)POST/GET/PATCH/DELETE /licenses— admin license CRUDGET/DELETE /my/licenses— user self-service + domain managementGET/POST/PATCH/DELETE /tiers— product tier CRUDServices
services/licensing/signer.go— ed25519 keypair management, sign/verify download tokensAdmin UI
/-/admin/license-tiers— tier list with CRUD, repo mapping, license countsChangelog
Test plan
GET /api/v1/licensing/validate?dlid=XXX&product=YYY&domain=ZZZ (public) GET /api/v1/licensing/{dlid}/status (authenticated, reqToken) Public endpoint returns valid/invalid with reason codes for Joomla plugin and external integration use. Authenticated endpoint returns full license detail with entitlement list and domain usage for admin dashboards.GET /api/v1/licensing/download/{product}/{version}.zip?token=XXX&expires=YYY&dlid=ZZZ ed25519 keypair auto-generated on first use, stored in Gitea data dir. Update XML endpoint now generates signed URLs with 5-minute TTL. Download verifies signature + expiry + DLID + entitlement before serving the release ZIP attachment. Downloads logged to audit trail.