Expand description
Shared utilities for token renewal.
Structs§
- Middleware
Wrapper 🔒 - A wrapper that implements [reqwest_middleware::Middleware] by delegating to a MiddlewareExt for token retrieval. We can’t implement [Middleware] directly on MiddlewareExt because [Middleware] is defined in an external crate, so we use this wrapper to bridge between them.
Constants§
Traits§
- Middleware
Ext 🔒 - Trait used to share over the token attaching middleware. This is implemented by the token management structs, leaving them responsible for handling token retrieval and renewal logic. The middleware simply calls MiddlewareExt::get_token to get the current token (renewing if necessary) and attaches it to the request.