pub async fn authenticate(
auth_provider: &dyn AuthProvider,
req: &mut Request<Body>,
) -> Result<(), AuthError>Expand description
Validates req, logs a rejection, strips the spoofable x-auth-* headers and inserts the
AuthContext on success.
auth_middleware is this plus running the next layer. Callers that need the rejected request
back (to inspect it before responding) compose this directly.