Skip to main content

require_authentication

Function require_authentication 

Source
pub async fn require_authentication(request: Request, next: Next) -> Response
Expand description

Deny-by-default authentication middleware.

Resolves AuthenticatedCaller from the request parts. On success the request proceeds to the inner service; on failure the AuthError is rendered (401 / 403 / 429) and the inner handler is never reached.