pub trait RequestSignerExt<Request, Error>{
// Required method
fn attach_token(
&self,
request: Request,
record: &TokenRecord,
) -> Result<Request, Error>;
}Expand description
Describes how to attach a TokenRecord to an outbound request without
constraining the HTTP client type.
The trait is intentionally generic over both the request and error types so
implementers can integrate with any client builder (reqwest, surf, a
bespoke SDK, etc.) while keeping oauth2-broker free of those dependencies.
Required Methods§
Sourcefn attach_token(
&self,
request: Request,
record: &TokenRecord,
) -> Result<Request, Error>
fn attach_token( &self, request: Request, record: &TokenRecord, ) -> Result<Request, Error>
Consumes (or clones) the provided request and injects authorization state
derived from the TokenRecord.