Available on crate feature
auth only.Expand description
Single-flight OAuth2 / token-endpoint auth providers (enable the auth
feature). Share one across connectors via with_auth_provider or the CLI
auth: { ref } catalog.
Structs§
- OAuth2
Client Credentials Provider - OAuth2
client_credentialsgrant provider. - OAuth2
Refresh Provider - OAuth2
refresh_tokengrant provider with refresh-token rotation capture. - Static
Provider - Returns a fixed
Credentialforever. Useful for pre-minted tokens whose lifetime exceeds the run, or for sharing one static bearer token across many connectors. - Token
Endpoint Provider - Fetches a token from an arbitrary endpoint, extracts it via
token_path(JSONPath), and caches it with optional expiry tracking. Single-flight refresh via an internalMutex.
Constants§
- DEFAULT_
EXPIRY_ RATIO - Default fraction of
expires_inafter which a token is proactively refreshed. A token withexpires_in = 3600is refreshed after 3240 s.
Functions§
- build_
provider - Build a shared
AuthProviderfrom a{ type, config }spec — the shape used by the CLI’s top-levelauth:catalog.