pub async fn auth_middleware(
__arg0: State<Arc<AppState>>,
request: Request,
next: Next,
) -> ResponseExpand description
Authentication middleware that validates Bearer tokens.
This middleware runs on every request and:
- Checks for an
Authorization: Bearer <token>header - Validates the token against the configured
auth.api_token - Sets
AuthStatus::Adminif valid,AuthStatus::Publicotherwise - Inserts the status into request extensions for handlers to check