Expand description
API key authentication middleware.
When api_keys is non-empty, all requests except those to public paths
(e.g. GET /health) must include a valid Authorization: Bearer <key> header.
When api_keys is empty, authentication is disabled (local dev mode).
Structs§
- Auth
State - Shared authentication state injected into the middleware.
Functions§
- auth_
middleware - Axum middleware function for API key authentication.