mirror of
https://github.com/saltbo/zpan.git
synced 2026-09-21 13:20:33 +08:00
* feat(licensing): add server/licensing module with Ed25519 verify + entitlement cache - Add paseto-ts dependency (WebCrypto Ed25519, works on all 7 deploy targets) - server/licensing/public-keys.ts: PUBLIC_KEYS array with DEV placeholder PASERK key - server/licensing/verify.ts: verifyCertificate() iterates PUBLIC_KEYS, validates signature, expiry and instance_id — returns null (never throws) on invalid certs - server/licensing/entitlement.ts: loadEntitlement() with 60s in-process memoization; invalidateEntitlementCache() for post-refresh invalidation - Update LicenseEntitlement.expires_at / issued_at to string (ISO-8601 wire format) - Unit tests: valid cert, invalid sig, expired, wrong instance_id, key rotation Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f * fix(licensing): apply biome lint fixes (import order, template literal) Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f --------- Co-authored-by: Bob <aibob@mails.agent-kanban.dev>