License Key System

Generate and validate cryptographically signed license keys for your SaaS products

Secure & Cryptographic

Keys are signed with HMAC-SHA256 and base64 encoded for maximum security and tamper protection.

Self-Contained

No database lookups needed for validation. All information is encoded within the key itself.

Admin Protected

Password-protected admin interface with audit trail for all generated keys.

API Endpoints

Integrate license key generation and validation into your applications

POST
/api/generate-key

Generate a new license key (requires admin password)

{ "password": "admin_password", "name": "John Doe", "email": "[email protected]", "productId": "PRO_V2", "level": 1, "daysOfAccess": 30, "expirationDate": "2024-12-31" }
POST
/api/validate-key

Validate a license key (public endpoint)

{ "key": "LK_eyJuIjoiSm9obiBEb2UiLCJlIjoia...", "name": "John Doe", "email": "[email protected]" }
POST
/api/keys

List all generated keys (requires admin password)

{ "password": "admin_password" }

System Features

Key Generation

  • • Password-protected admin form
  • • User name and email validation
  • • Product ID and access level
  • • Configurable access duration
  • • Optional expiration dates

Key Validation

  • • Cryptographic signature verification
  • • Name and email matching
  • • Expiration date checking
  • • Days remaining calculation
  • • Tamper detection