Moko Consulting

Open-source software for Joomla, Gitea, and web platforms. Home of MokoSuite, MokoGitea, and MokoCLI.

Tennessee
api/Licensing-API.-

Licensing API

Overview

The MokoGitea Licensing API provides 16 endpoints for managing software licenses with Download IDs (DLIDs), domain activations, tier-based entitlements, and signed download tokens.

Base URL: https://git.mokoconsulting.tech/api/v1/licensing

DLID Format

Download IDs use a CRC32-checksummed format for client-side validation:

[28 hex characters][4 hex CRC32 checksum] = 32 hex total

Example: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6 (last 4 chars = CRC32 of first 28)

Endpoints

Public (No Auth)

Method Endpoint Purpose
POST /licensing/validate Validate a DLID + domain pair
GET /licensing/updates/{dlid}/{element} Joomla XML update manifest (gated by DLID)
GET /licensing/download/{token} Signed download (ed25519 token, 5-min TTL)

Authenticated (User Token)

Method Endpoint Purpose
GET /licensing/status Get license status for authenticated user
GET /licensing/domains List active domains
POST /licensing/domains Add/activate a domain
DELETE /licensing/domains/{domain} Deactivate a domain
POST /licensing/download-token Generate signed download token

Admin (Site Admin Only)

Method Endpoint Purpose
GET /licensing/admin/licenses List all licenses
POST /licensing/admin/licenses Create a new license
GET /licensing/admin/licenses/{id} Get license details
PATCH /licensing/admin/licenses/{id} Update license
DELETE /licensing/admin/licenses/{id} Revoke license
GET /licensing/admin/tiers List product tiers
POST /licensing/admin/tiers Create product tier
PATCH /licensing/admin/tiers/{id} Update product tier

Product Tiers

Tiers define what extensions a license grants access to:

Tier Extensions Domain Limit
starter com_mokosuite 1
professional com_mokosuite + 3 plugins 3
business All MokoSuite extensions 10
enterprise All + priority support Unlimited
single_extension One specific extension 1

Security

  • ed25519 signing: Download tokens are signed with server keypair, 5-minute TTL
  • CRC32 validation: DLID format allows client-side quick-reject of typos
  • Domain binding: Licenses are locked to activated domains
  • Audit trail: All status and tier changes are logged
  • Models: models/licensing/ (license.go, entitlement.go, activation.go, product_tier.go, audit.go)
  • Routes: routers/api/v1/licensing/ (validate.go, download.go, manage.go, updates.go)
  • Signer: services/licensing/signer.go
  • Migration: models/migrations/v1_27/v359.go
  • Admin UI: routers/web/admin/license_tiers.go

Revision History

Date Author Changes
2026-06-21 jmiller Initial creation documenting all 16 endpoints