Skip to main content

Module oauth_session

Module oauth_session 

Source
Expand description

Shared OAuth token lifecycle for the consumer-cloud backends.

Google Drive, Dropbox, and OneDrive all cache an access token, refresh it on expiry (persisting the new tokens through its credential custody), and retry a request once on a 401. This holds that logic in one place; each backend owns an OAuthSession and routes its requests through api_call.

Structs§

OAuthSession
Owns a provider’s OAuth tokens (refreshing them as needed) and the reqwest::Client its requests go out on — every OAuth backend shared the same client field and token lifecycle, so both live here once.