Skip to main contentModule auth
Source - ApiKeySet
- Set of valid API keys loaded from
MOLD_API_KEY.
- api_key_header_name
- Header name for API key authentication (needed for CORS
Access-Control-Allow-Headers). - inject_auth_state
- Injects the
AuthState as a request extension so the middleware can access it. - load_api_keys
- Load API keys from the
MOLD_API_KEY environment variable. - require_api_key
- Axum middleware that enforces API key authentication.
- AuthState
- Shared auth state —
None means authentication is disabled.