License validation API — validate DLID + product + domain #623

Open
opened 2026-06-12 07:59:17 +00:00 by jmiller · 1 comment
Owner

Phase 2.3 — Validation API

Parent: #616 | Depends on: #618, #619, #620

routers/api/v1/licensing/validate.go:

Routes

  • GET /api/v1/licensing/validate?dlid=XXX&product=YYY&domain=ZZZ — public validation check
  • GET /api/v1/licensing/{dlid}/status — full license status (authenticated)

Validate response

{
  "valid": true,
  "tier": "pos",
  "tier_name": "MokoSuite POS",
  "products": ["base", "crm", "erp", "pos"],
  "domains_used": 2,
  "domains_max": 5,
  "expires_at": "2027-06-11T00:00:00Z",
  "status": "active"
}

Invalid response:

{
  "valid": false,
  "reason": "expired" // or "revoked", "invalid_dlid", "no_entitlement", "domain_limit"
}

Use cases

  • Joomla system plugin checks license status on admin login (show warning if expiring)
  • MokoSuite Shop validates DLID during purchase flow
  • External integrations verify license programmatically

Acceptance criteria

  • Public endpoint (no auth needed) for basic valid/invalid check
  • Authenticated endpoint returns full license detail
  • Rate limited to prevent brute-force DLID enumeration
  • Returns specific reason codes for invalid states
## Phase 2.3 — Validation API Parent: #616 | Depends on: #618, #619, #620 `routers/api/v1/licensing/validate.go`: ### Routes - `GET /api/v1/licensing/validate?dlid=XXX&product=YYY&domain=ZZZ` — public validation check - `GET /api/v1/licensing/{dlid}/status` — full license status (authenticated) ### Validate response ```json { "valid": true, "tier": "pos", "tier_name": "MokoSuite POS", "products": ["base", "crm", "erp", "pos"], "domains_used": 2, "domains_max": 5, "expires_at": "2027-06-11T00:00:00Z", "status": "active" } ``` Invalid response: ```json { "valid": false, "reason": "expired" // or "revoked", "invalid_dlid", "no_entitlement", "domain_limit" } ``` ### Use cases - Joomla system plugin checks license status on admin login (show warning if expiring) - MokoSuite Shop validates DLID during purchase flow - External integrations verify license programmatically ### Acceptance criteria - [ ] Public endpoint (no auth needed) for basic valid/invalid check - [ ] Authenticated endpoint returns full license detail - [ ] Rate limited to prevent brute-force DLID enumeration - [ ] Returns specific reason codes for invalid states
Author
Owner

Branch created: feature/623-license-validation-api-validate-dlid-pro

git fetch origin
git checkout feature/623-license-validation-api-validate-dlid-pro
Branch created: [`feature/623-license-validation-api-validate-dlid-pro`](https://code.mokoconsulting.tech/MokoConsulting/MokoGitea-APP/src/branch/feature/623-license-validation-api-validate-dlid-pro) ```bash git fetch origin git checkout feature/623-license-validation-api-validate-dlid-pro ```
Sign in to join this conversation.