Skip to main content

auth_middleware

Function auth_middleware 

Source
pub async fn auth_middleware(
    __arg0: State<Arc<AuthValidator>>,
    req: Request,
    next: Next,
) -> Response
Expand description

Axum middleware. Reads the Authorization header, dispatches to the configured validator, attaches the principal to the request, or returns the appropriate error response.