Appearance
@luminaphoto/lumina-js / Licensing / createDependentKey
Function: createDependentKey()
ts
function createDependentKey(masterKey, ttlSeconds?): Promise<string>;Create a short-lived dependent license key from a master key.
Call this from your server (Node.js) -- never expose the master key in browser code. The resulting dependent key can be safely passed to the browser client.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
masterKey | string | undefined | Valid, non-expired master license key |
ttlSeconds | number | 86400 | Time-to-live in seconds (default 86400, max 86400) |
Returns
Promise<string>
Base64url-encoded dependent key string
Throws
Shared.LuminaError if the master key is invalid, expired, or not a master key