Module http

Module http 

Source
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§

InstrumentedHandle
Public handle returned by ReqwestHttpClient that satisfies TokenHttpClient.
ReqwestHttpClient
Thin wrapper around ReqwestClient so 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 custom ReqwestClient to disable redirect following, because the broker passes this client into the oauth2 crate when it builds the facade layer.
ResponseMetadata
Captures metadata from the most recent HTTP response for downstream error mapping.
ResponseMetadataSlot
Thread-safe slot for sharing ResponseMetadata between transport and error layers.

Traits§

TokenHttpClient
Abstraction over HTTP transports capable of executing OAuth token exchanges while publishing response metadata to the broker’s instrumentation pipeline.