Skip to main content

Module auth

Module auth 

Source

Structs§

ApiKeySet
Set of valid API keys loaded from MOLD_API_KEY.

Functions§

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.

Type Aliases§

AuthState
Shared auth state — None means authentication is disabled.