feat(licenses): license validation API endpoint #301

Open
opened 2026-05-31 04:28:40 +00:00 by jmiller · 0 comments
Owner

Current

  • ValidateLicenseKey exists in model layer
  • No public API endpoint for external validation

Required

  • POST /api/v1/repos/{owner}/{repo}/license-keys/validate
  • Accepts: key (raw key string), domain (optional)
  • Returns: valid (bool), package_name, allowed_channels, expires_at, sites_used, sites_max
  • No auth required (public endpoint for client-side validation)
  • Records usage on successful validation

Files

  • routers/api/v1/repo/license_key.go — ValidateLicenseKeyAPI handler
  • modules/structs/license_key.go — ValidateLicenseKeyResponse struct
  • routers/api/v1/api.go — route (public, no reqToken)

Ref #296


@MokoBot - Claude Opus 4.6

## Current - ValidateLicenseKey exists in model layer - No public API endpoint for external validation ## Required - POST /api/v1/repos/{owner}/{repo}/license-keys/validate - Accepts: key (raw key string), domain (optional) - Returns: valid (bool), package_name, allowed_channels, expires_at, sites_used, sites_max - No auth required (public endpoint for client-side validation) - Records usage on successful validation ## Files - routers/api/v1/repo/license_key.go — ValidateLicenseKeyAPI handler - modules/structs/license_key.go — ValidateLicenseKeyResponse struct - routers/api/v1/api.go — route (public, no reqToken) Ref #296 --- *@MokoBot - Claude Opus 4.6*
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoGitea#301