Expand description
JWT authentication middleware for Haima.
Reuses lago_auth::jwt for token validation. Haima does not need
Lago session mapping — it only validates that the caller holds a valid
JWT signed with the shared secret.
Behaviour:
- If no JWT secret is configured, auth is disabled (local dev mode) and a warning is logged on startup.
- If a secret IS configured, all protected routes require a valid
Authorization: Bearer <token>header.
Structs§
- Auth
Config - Auth configuration injected as axum state.
Functions§
- require_
auth - Axum middleware that validates JWT bearer tokens on protected routes.