Expand description
API Key authentication middleware for the Kroki-rs server.
When server.auth.enabled = true, extracts any API key or admin credentials
and validates them.
When disabled (the default), all requests pass through — enabling fast local development.
Functions§
- admin_
auth_ middleware - Axum middleware that enforces admin authentication via Basic Auth.
- auth_
middleware - Axum middleware that enforces API key authentication.
- find_
api_ key_ entry - Looks up the
ApiKeyEntryfor a given key string. ReturnsNoneif the key is not found or auth is disabled.