Leases add time-limited access control to content keys. When enabled, the key server issues a lease on first key request and validates it on subsequent requests. Revoking a lease immediately stops playback — without re-encrypting the video.Documentation Index
Fetch the complete documentation index at: https://docs.blindcast.dev/llms.txt
Use this file to discover all available pages before exploring further.
Enable leases
SetLEASE_TTL_MS to enable:
How leases work
- Player calls
POST /keys/leaseswith the content ID and auth token - Key server extracts the viewer ID from the JWT
subclaim, creates a lease, and returns the lease ID + TTL - Player sends
X-Lease-Idheader on everyGET /keys/:contentIdrequest - Key server validates the lease on each request — if expired or revoked, returns 403
- Player renews the lease at 75% of TTL via
POST /keys/leases/renew
Revoking access
Revoke by viewer
Revoke all active leases for a viewer (e.g., when they cancel their subscription):Revoke by lease ID
Revoke a specific lease:Revoke via database
For bulk operations, update the database directly:What happens when a lease is revoked
- The player’s next key request (or lease renewal) gets a
403response - The player emits a
KEY_LEASE_EXPIREDerror - Playback stops — the player cannot fetch new keys
Configuration
| Variable | Default | Description |
|---|---|---|
LEASE_TTL_MS | — | Lease TTL in milliseconds. If unset, leases are disabled. |
DATABASE_URL | sqlite:///data/blindcast.db | Where leases are stored |