forked from TrueCloudLab/rclone
jottacloud: Add support for Tele2 Cloud
This commit is contained in:
parent
f36d6d01b5
commit
663b2d9c46
2 changed files with 31 additions and 2 deletions
|
@ -69,6 +69,10 @@ const (
|
|||
teliaCloudTokenURL = "https://cloud-auth.telia.se/auth/realms/telia_se/protocol/openid-connect/token"
|
||||
teliaCloudAuthURL = "https://cloud-auth.telia.se/auth/realms/telia_se/protocol/openid-connect/auth"
|
||||
teliaCloudClientID = "desktop"
|
||||
|
||||
tele2CloudTokenURL = "https://mittcloud-auth.tele2.se/auth/realms/comhem/protocol/openid-connect/token"
|
||||
tele2CloudAuthURL = "https://mittcloud-auth.tele2.se/auth/realms/comhem/protocol/openid-connect/auth"
|
||||
tele2CloudClientID = "desktop"
|
||||
)
|
||||
|
||||
// Register with Fs
|
||||
|
@ -131,6 +135,9 @@ func Config(ctx context.Context, name string, m configmap.Mapper, config fs.Conf
|
|||
}, {
|
||||
Value: "telia",
|
||||
Help: "Telia Cloud authentication.\nUse this if you are using Telia Cloud.",
|
||||
}, {
|
||||
Value: "tele2",
|
||||
Help: "Tele2 Cloud authentication.\nUse this if you are using Tele2 Cloud.",
|
||||
}})
|
||||
case "auth_type_done":
|
||||
// Jump to next state according to config chosen
|
||||
|
@ -238,6 +245,21 @@ machines.`)
|
|||
RedirectURL: oauthutil.RedirectLocalhostURL,
|
||||
},
|
||||
})
|
||||
case "tele2": // tele2 cloud config
|
||||
m.Set("configVersion", fmt.Sprint(configVersion))
|
||||
m.Set(configClientID, tele2CloudClientID)
|
||||
m.Set(configTokenURL, tele2CloudTokenURL)
|
||||
return oauthutil.ConfigOut("choose_device", &oauthutil.Options{
|
||||
OAuth2Config: &oauth2.Config{
|
||||
Endpoint: oauth2.Endpoint{
|
||||
AuthURL: tele2CloudAuthURL,
|
||||
TokenURL: tele2CloudTokenURL,
|
||||
},
|
||||
ClientID: tele2CloudClientID,
|
||||
Scopes: []string{"openid", "jotta-default", "offline_access"},
|
||||
RedirectURL: oauthutil.RedirectLocalhostURL,
|
||||
},
|
||||
})
|
||||
case "choose_device":
|
||||
return fs.ConfigConfirm("choose_device_query", false, "config_non_standard", "Use a non standard device/mountpoint e.g. for accessing files uploaded using the official Jottacloud client?")
|
||||
case "choose_device_query":
|
||||
|
|
|
@ -41,8 +41,8 @@ Note that the web interface may refer to this token as a JottaCli token.
|
|||
|
||||
### Legacy authentication
|
||||
|
||||
If you are using one of the whitelabel versions (e.g. from Elkjøp or Tele2) you may not have the option
|
||||
to generate a CLI token. In this case you'll have to use the legacy authentication. To to this select
|
||||
If you are using one of the whitelabel versions (e.g. from Elkjøp) you may not have the option
|
||||
to generate a CLI token. In this case you'll have to use the legacy authentication. To do this select
|
||||
yes when the setup asks for legacy authentication and enter your username and password.
|
||||
The rest of the setup is identical to the default setup.
|
||||
|
||||
|
@ -53,6 +53,13 @@ additionally uses a separate authentication flow where the username is generated
|
|||
rclone to use Telia Cloud, choose Telia Cloud authentication in the setup. The rest of the setup is
|
||||
identical to the default setup.
|
||||
|
||||
### Tele2 Cloud authentication
|
||||
|
||||
As Tele2-Com Hem merger was completed this authentication can be used for former Com Hem Cloud and
|
||||
Tele2 Cloud customers as no support for creating a CLI token exists, and additionally uses a separate
|
||||
authentication flow where the username is generated internally. To setup rclone to use Tele2 Cloud,
|
||||
choose Tele2 Cloud authentication in the setup. The rest of the setup is identical to the default setup.
|
||||
|
||||
## Configuration
|
||||
|
||||
Here is an example of how to make a remote called `remote` with the default setup. First run:
|
||||
|
|
Loading…
Reference in a new issue