package
1.69.1
Repository: https://github.com/rclone/rclone.git
Documentation: pkg.go.dev

# Functions

ConfigOAuth does the oauth config specified in the config block This is called with a state which has pushed on it state prefixed with "*oauth" state for oauth to return to state that returned the OAuth when we wish to recall it value that returned the OAuth.
ConfigOut returns a config item suitable for the backend config state is the place to return the config to oAuth is the config to run the oauth with.
Context returns a context with our HTTP Client baked in for oauth2.
GetToken returns the token saved in the config file under section name.
NewClient gets a token from the config file and configures a Client with it.
NewClientCredentialsClient creates a new OAuth module using the ClientCredential flow.
NewClientWithBaseClient gets a token from the config file and configures a Client with it.
NewRenew creates a new Renew struct and starts a background process which renews the token whenever it expires.
OverrideCredentials sets the ClientID and ClientSecret from the config file if they are not blank.
PutToken stores the token in the config file This saves the config file if it changes.

# Constants

DefaultAuthResponseTemplate is the default template used in the authorization webserver.
RedirectLocalhostURL is redirect to local webserver when active with localhost.
RedirectPublicSecureURL is a public https URL which redirects to the local webserver.
RedirectPublicURL is redirect to local webserver when active with public name.
RedirectURL is redirect to local webserver when active.
TitleBarRedirectURL is the OAuth2 redirect URL to use when the authorization code should be returned in the title bar of the browser, with the page text prompting the user to copy the code and paste it in the application.

# Variables

OpenURL is used when rclone wants to open a browser window for user authentication.
SharedOptions are shared between backends the utilize an OAuth flow.

# Structs

AuthResult is returned from the web server after authorization success or failure.
Config - structure that we will use to store the OAuth configuration settings.
Options for the oauth config.
Renew allows tokens to be renewed on expiry if uploads are in progress.
TokenSource stores updated tokens in the config file.

# Type aliases

CheckAuthFn is called when a good Auth has been received.