Skip to main content

Module auth

Module auth 

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

OAuth2ClientCredentialsProvider
OAuth2 client_credentials grant provider.
OAuth2RefreshProvider
OAuth2 refresh_token grant provider with refresh-token rotation capture.
StaticProvider
Returns a fixed Credential forever. Useful for pre-minted tokens whose lifetime exceeds the run, or for sharing one static bearer token across many connectors.
TokenEndpointProvider
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 internal Mutex.

Constants§

DEFAULT_EXPIRY_RATIO
Default fraction of expires_in after which a token is proactively refreshed. A token with expires_in = 3600 is refreshed after 3240 s.

Functions§

build_provider
Build a shared AuthProvider from a { type, config } spec — the shape used by the CLI’s top-level auth: catalog.