Expand description
Token registry for the loopback media server.
§Overview
Each call to TokenRegistry::mint produces a cryptographically random,
URL-safe base64 token (48 raw bytes → 64 base64 chars) that maps to a
TokenRecord containing the S3 coordinates, TTL, and the session that
owns it.
§OCP
- The registry is decoupled from the HTTP server so it can be swapped for a
more durable store (e.g.
redb) if cross-restart tokens ever become necessary. In v1 tokens are session-scoped and in-memory is sufficient. revoke_sessionis the single sweep point for session-end cleanup.
Structs§
- Token
Record - Everything the server needs to serve a single media token.
- Token
Registry - Thread-safe, in-memory store of live token records.
Type Aliases§
- Token
Registry Handle - Shared, heap-allocated token registry.