Expand description
Auth/BasicAuth/ApiKeyAuth: crate::Request::auth’s shape,
resolved to a header or query parameter by crate::Request::resolve_auth.
Also reused verbatim as crate::environment::Environment::auth — an
environment-level default applied to a request that sets no auth: of
its own — so the validation this module owns (mutual exclusivity,
header/query collision) is written here once and called from both
crate::Request::validate and crate::environment, never
duplicated.
Structs§
- ApiKey
Auth Auth::api_key: a static value sent as either a header or a query parameter.- Auth
crate::Request::auth: exactly one ofbearer,basic,api_keyoroauth, enforced byAuth::validate_exclusivity.- Basic
Auth Auth::basic’s credentials, base64-encoded asuser:passbycrate::Request::resolve_auth.- OAuth
Auth Auth::oauth: acquire a bearer token from an OAuth token endpoint before the request is sent, under one of three grants.
Enums§
- ApiKey
Location - Where
ApiKeyAuthplaces itsname/valuepair. - OAuth
Grant Type OAuthAuth::grant_type: which of the three supported OAuth grants to use. Seecrate::oauth’s module docs for howauthorization_codediffers from the other two.