Skip to main content

jwt_middleware

Function jwt_middleware 

Source
pub fn jwt_middleware(
    handler: Arc<dyn IAuthenticationHandler>,
) -> impl IMiddleware
Expand description

Create a JWT authentication middleware from an authentication handler.

Reads the Bearer token from Authorization header, validates it, and stores the resulting claims in the HTTP context for downstream use.