Skip to main content

Module middleware

Module middleware 

Source
Expand description

Axum middleware for JWT authentication.

Extracts the Authorization: Bearer <token> header, validates the JWT, and injects AuthUser into request extensions.

Structs§

AuthState
Shared state for the auth middleware.

Functions§

auth_middleware
Axum middleware: validate JWT and inject AuthUser.