pub async fn require_auth(
__arg0: State<Arc<AuthState>>,
request: Request,
next: Next,
) -> Result<Response, StatusCode>Expand description
Axum middleware that validates the Authorization: Bearer <token> header
against AuthState.
Case-insensitive prefix matching per RFC 7235. Constant-time token
comparison via constant_time_eq.
§Errors
Returns StatusCode::UNAUTHORIZED if the token is missing or invalid.