"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
oauth: Allow auth_url and token_url to be set in the config file
Nick Craig-Wood52e1bfae2a8b
diff --git a/fs/config.go b/fs/config.goindex 4bc804b1c..993dacae1 100644--- a/fs/config.go+++ b/fs/config.go@@ -44,6 +44,12 @@ const (// ConfigClientSecret is the config key used to store the client secretConfigClientSecret = "client_secret"+ // ConfigAuthURL is the config key used to store the auth server endpoint+ ConfigAuthURL = "auth_url"++ // ConfigTokenURL is the config key used to store the token server endpoint+ ConfigTokenURL = "token_url"+// ConfigAutomatic indicates that we want non-interactive configurationConfigAutomatic = "config_automatic")diff --git a/oauthutil/oauthutil.go b/oauthutil/oauthutil.goindex a5da620b5..6f8948a68 100644--- a/oauthutil/oauthutil.go+++ b/oauthutil/oauthutil.go@@ -209,6 +209,16 @@ func overrideCredentials(name string, origConfig *oauth2.Config) (config *oauth2config.ClientSecret = ClientSecretchanged = true}+ AuthURL := fs.ConfigFileGet(name, fs.ConfigAuthURL)+ if AuthURL != "" {+ config.Endpoint.AuthURL = AuthURL+ changed = true+ }+ TokenURL := fs.ConfigFileGet(name, fs.ConfigTokenURL)+ if TokenURL != "" {+ config.Endpoint.TokenURL = TokenURL+ changed = true+ }return config, changed}