Crate gotham_middleware_jwt[][src]

Expand description

Ensures that only requests with valid JSON Web Tokens included in the HTTP Authorization header are allowed to pass.

Requests that lack a token are returned with the Status Code 400: Bad Request. Tokens that fail validation cause the middleware to return Status Code 401: Unauthorized.


Struct to contain the JSON Web Token on a per-request basis.

This middleware verifies that JSON Web Token credentials, provided via the HTTP Authorization header, are extracted, parsed, and validated according to best practices before passing control to middleware beneath this middleware for a given mount point.