Expand description
Short-lived, single-use tickets for WebSocket authentication.
Replaces the old ?token=<api_key> pattern that leaked persistent
credentials into proxy/CDN/browser logs.
§Flow
- Client
POST /api/ws-ticketwithx-api-keyheader →{"ticket":"wst_…","expires_in":30} - Client connects to
/ws?ticket=wst_…within 30 seconds - Server validates (exists, not expired, not already used), consumes, upgrades
Structs§
- Ticket
Store - In-memory store for short-lived WebSocket upgrade tickets.