Expand description
Transport primitives for OAuth token exchanges.
The module exposes TokenHttpClient alongside ResponseMetadata and
ResponseMetadataSlot so downstream crates can integrate custom HTTP clients
without losing the broker’s instrumentation hooks. Implementations call
ResponseMetadataSlot::take before dispatching a request and
ResponseMetadataSlot::store once an HTTP status or retry hint is known,
enabling map_request_error to classify failures with consistent metadata.
Structs§
- Instrumented
Handle - Public handle returned by
ReqwestHttpClientthat satisfiesTokenHttpClient. - Reqwest
Http Client - Thin wrapper around
ReqwestClientso shared HTTP behavior lives in one place. Token requests should not follow redirects, matching OAuth 2.0 guidance that token endpoints return results directly instead of delegating to another URI. Configure any customReqwestClientto disable redirect following, because the broker passes this client into theoauth2crate when it builds the facade layer. - Response
Metadata - Captures metadata from the most recent HTTP response for downstream error mapping.
- Response
Metadata Slot - Thread-safe slot for sharing
ResponseMetadatabetween transport and error layers.
Traits§
- Token
Http Client - Abstraction over HTTP transports capable of executing OAuth token exchanges while publishing response metadata to the broker’s instrumentation pipeline.