Expand description
Authentication layer for the koan server.
When auth_enabled = true:
- GraphQL requests must carry a valid JWT (see
middlewarefor where it is read from); the web UI takes it only as thekoan_accesscookie - Auth routes (/auth/login, /auth/refresh, /auth/logout) are always accessible
When auth_enabled = false (opt-in, not the default):
- All requests are treated as admin — no auth required.
Modules§
- middleware
- Axum middleware for JWT authentication.
- password
- Username and password checks for transports that send them with every
request, such as Subsonic’s
p=. - routes
- Auth HTTP routes: login, refresh, logout.
Structs§
- Auth
User - Authenticated user context injected into request extensions and GraphQL context.