Developer Quick Start
Integrate a licensed client with MyHoreca Licensing in under an hour.
1. Create product and key (Console)
- Open Vendor Console → Products → create a product.
- Open the product → tab Keys → create a license and issue a key (plaintext is shown once).
- Optional: Product → Policy to review FeatureLimits; license detail to set custom data slots.
- Note the Management base URL and tenant from your deployment.
2. Choose an SDK
See the SDK matrix and SDK reference for language coverage.
Typical flow:
- Build a device identity: generate a fresh installation key on first run of each machine — never bake the private key into a golden image (Device Identity).
- Call activate / validate with the license key (or activation token).
- Cache the signed lease; refresh on heartbeat / expiry.
- Locally verify the lease via JWKS (next section) — ES256, not RSA-in-binary.
- Enforce entitlements (and optional custom data claims) from the verified payload — see Entitlements.
3. Local verify (JWKS)
Do not embed a Cryptolens-style RSA public key as the trust model. Fetch / cache Runtime JWKS, verify Compact JWS (MH-LEASE-V1), then enforce claims. Full narrative: Verify trust (JWKS).
| Step | Action |
|---|---|
| 1 | Activate / refresh → receive leaseToken (Compact JWS) |
| 2 | SDK loads JWKS from Runtime (cache TTL; one refresh on unknown kid; then fail closed) |
| 3 | Call the SDK verify helper (VerifyLeaseAsync / verifyLease / …) with expected audience |
| 4 | Only after isAccepted — read entitlements / optional custom data |
Minimal .NET:
var verified = await client.VerifyLeaseAsync(
leaseToken,
new LeaseVerificationOptions { ExpectedAudience = "myhoreca.runtime" });
if (!verified.IsAccepted) { /* deny features */ }
Minimal TypeScript:
const verified = await client.verifyLease(leaseToken, {
expectedAudience: "myhoreca.runtime",
});
if (!verified.isAccepted) {
/* deny features */
}
Runnable samples already end with verify: SDK matrix → Examples.
4. Offline and floating (optional)
- Offline request/response and Local Relay: Offline and Local Relay.
- Floating seats: Floating.
- Remember: customer webhooks ≠ Relay sync.