Skip to main content

Module auth_context

Module auth_context 

Source
Expand description

Auth context injected into request extensions by crate::middleware::AuthLayer.

Downstream handlers can read this when they need caller identity or scope checks, but not every route consumes it yet.

Structs§

AuthContext
Stored in request extensions by the HTTP auth middleware (see crate::middleware::AuthLayer).

Functions§

auth_context
Convenience accessor for handlers that have already split a request into [Parts].
www_authenticate_value
Build the value of an WWW-Authenticate: Bearer ... response header pointing browsers/agents at the protected-resource metadata document.