Skip to main content

Module auth

Module auth 

Source
Expand description

Mandatory authentication middleware

All endpoints except /health require a valid Bearer token. Auth cannot be disabled. If no CODETETHER_AUTH_TOKEN is set the server generates a secure random token at startup and prints it to stderr so the operator can copy it — but the gates never open without a token.

Structs§

AuthState
Shared auth state.

Functions§

require_auth
Axum middleware layer that enforces Bearer token auth on every request except public paths.