Expand description
TokenProvider and vendor profile catalog.
Feature net (default) enables HTTP TokenProviders. Maps-only hosts
disable default features and keep profile parse/load without reqwest.
use wiremux_auth::shipped_profile_ids;
assert!(shipped_profile_ids().iter().any(|id| *id == "openai"));Modules§
- device_
flow - OAuth 2.0 device authorization grant (RFC 8628). Poll is bounded.
- pkce
- Generic PKCE (RFC 7636) for profile-driven login.
Structs§
- AwsCredentials
- Temporary credentials from STS AssumeRole.
- AwsSign
Params - Inputs for
sign_aws_request. - AwsSts
Config - Long-lived keys used to call STS AssumeRole.
- AwsSts
Token Provider - STS AssumeRole. Session keys are not a Bearer API token.
- Azure
Token Provider - Azure AD client-credentials grant.
- Betas
- Beta header values and merge policy.
- Dialect
- Dialect selection and stream/tool policies.
- Fingerprint
- Encode-time fingerprint (API request only).
- GcpToken
Provider - Service-account JWT bearer grant, or
authorized_userADC refresh. - Http
- HTTP request surface (API calls, not the token POST).
- Load
Options - Catalog load inputs. Same-id layers merge field-wise (shipped < user dir < explicit file).
- Oauth
Pack - The
[oauth]table: token POST and login surface. - Profile
Token Provider - Profile-driven OAuth refresh.
- Resolved
Profile - Fully resolved profile document (one
id). - Static
Token - A static API key. Used when no OAuth refresh is needed.
- Token
Exchange Response - Token response from an authorization-code or device-code exchange.
- Token
Response [oauth.token_response]pointers into the refresh HTTP body.
Enums§
- AnyToken
Provider - Type-erased token provider.
- Auth
Error - Failure from credential load, refresh, or fail-closed write-back.
- Auth
Scheme - API auth scheme.
nonesends noAuthorizationand nox-api-key. - Creds
Format - Named credential-store layouts.
- Expires
Unit - Expiry field unit.
- Forbidden
Field Policy - Encode-time policy for
forbidden_body_fields. - List
Merge - List merge policy.
verbatimis an alias ofreplace. - Login
- Login engine selection.
- Profile
Error - Failure from parse, refuse, or catalog load.
- Stream
Unknown Policy - How decode treats unrecognized SSE events.
- Token
Request Format - Token POST body encoding.
- Tool
Name Case - Tool-name case conversion.
- Tool
Type Policy - How encode treats unknown / namespaced tool types.
- Wire
- v1 wire dialects. Not a host registry name.
Constants§
- GROK_
CHAT_ PROXY_ CLIENT_ IDENTIFIER x-grok-client-identifierthis crate sends to the Grok chat proxy.- GROK_
CHAT_ PROXY_ CLIENT_ VERSION x-grok-client-versionforcli-chat-proxy.grok.com.- SCHEMA_
VERSION_ MAX - Highest
schema_versionthis crate understands. - VERSION
- Crate version from Cargo.toml.
Traits§
- Token
Provider - A provider of short-lived Bearer tokens.
Functions§
- credential_
options - Ways a profile can authenticate, for error text shared by the proxy
and
auth login. - default_
adc_ path - Well-known
gcloudADC path (CLOUDSDK_CONFIG, else~/.config/gcloud). - default_
user_ profile_ dir - Directory
wiremux profile ingestwrites when--diris omitted. Lastuser_profile_dirsentry soWIREMUX_PROFILE_DIRand the macOS Application Support path win the same way load does. - format_
oauth_ transport_ error - Short reason plus origin only. Never format a raw
reqwesterror. - is_
oauth_ transport_ error - list_
profiles - List document ids from shipped ∪ user dir ∪ explicit file.
- load_
profile - Load the profile whose document
idequalsid. - load_
profile_ for_ wire - Load a profile for a dialect wire.
- load_
profile_ from_ cli --profile/ path-vs-id disambiguation.- missing_
credential_ field - Field text for
AuthError::MissingField. Display addsmissing. - not_
found_ message - Catalog miss: known ids, plus a close-match hint when unique.
- parse_
profile_ str - Parse a profile document from TOML or JSON text.
- persist_
login_ tokens - Persist tokens from a login exchange.
- provider_
for_ profile - Same load path as
token_for_profile, but keep the provider so the host canmark_stale/wake. Catalog id only; paths useload_profile_from_clithenprovider_from_profile. - provider_
for_ profile_ opts - provider_
from_ oauth - Build a provider from an
[oauth]pack (no fingerprint, no API headers). - provider_
from_ oauth_ opts - Same as
provider_from_oauth, with a host-supplied credentials path. - provider_
from_ profile - Build a provider from a resolved profile.
- redact_
secret_ looking - Redact common token prefixes and JWT-looking blobs.
- redact_
url_ origin - Scheme + host/port only. Drops userinfo, path, query, and fragment.
- remove_
store_ entry - Remove one
oidc-auth-jsonprofile entry. Deletes the file when empty. - sanitize_
oauth_ error_ text - Strip controls, redact secret-looking tokens, and cap length.
- shipped_
profile_ ids - Every shipped catalog id, in the same order
load_profilewalks. - sign_
aws_ request - Sign a request with SigV4. Returns the
Authorizationheader value. - token_
for_ profile - Load a catalog id (example
anthropic-oauth) and return one access token. - token_
for_ profile_ cached - Load a catalog id and return the stored Bearer without POSTing
token_url. Empty access still fails closed.token_for_profilemay still block on keychain plus one or two HTTP refreshes. - token_
for_ profile_ opts - Same, with host LoadOptions (tests, IsolatedHome, no shipped).
- token_
for_ profile_ opts_ cached - Same as
token_for_profile_cached, with hostLoadOptions. - user_
profile_ dirs - Overlay directories
load_profilewalks (XDG, then macOS Application Support, thenWIREMUX_PROFILE_DIR). Later dirs win on the same id.