ETS-backed store for ephemeral long-term TURN credentials.
What problem this solves
Username/password pairs provisioned via the operator API or Auth.Client must
be readable from authentication handlers on the hot path without serialising
through a GenServer. A named public ETS table gives concurrent read access
with low latency.
Internal: rows are {username, credential_map} shared between
Auth.Client (writes) and authenticate actions (reads). Created once at
application start via init/0.
RFCs
- RFC 8489 (long-term credentials, USERHASH indexing for username lookup)
Summary
Functions
Removes the row for username.
Returns [{username, value}] or [] when username is absent.
Creates the named public table when it does not already exist.
Inserts or replaces the credential map for username.