Пример #1
0
func Init(clientID, clientSecret, redirect string) {
	config = &oauth2.Config{
		ClientID:     clientID,
		ClientSecret: clientSecret,
		RedirectURL:  redirect + "drive",
		Scopes:       []string{drive.DriveReadonlyScope},
		Endpoint:     google.Endpoint,
	}
	protocol.RegisterOAuth("drive", config, New, reflect.TypeOf(&Drive{}))
}
Пример #2
0
func Init(clientID, clientSecret, redirect string) {
	config := &oauth2.Config{
		ClientID:     clientID,
		ClientSecret: clientSecret,
		RedirectURL:  redirect + "dropbox",
		Endpoint: oauth2.Endpoint{
			AuthURL:  "https://www.dropbox.com/1/oauth2/authorize",
			TokenURL: "https://api.dropbox.com/1/oauth2/token",
		},
	}
	protocol.RegisterOAuth("dropbox", config, New, reflect.TypeOf(&Dropbox{}))
}
Пример #3
0
func Init(clientID, clientSecret, redirect string) {
	config := &oauth2.Config{
		ClientID:     clientID,
		ClientSecret: clientSecret,
		RedirectURL:  redirect + "soundcloud",
		Scopes:       []string{"non-expiring"},
		Endpoint: oauth2.Endpoint{
			AuthURL:  "https://soundcloud.com/connect",
			TokenURL: "https://api.soundcloud.com/oauth2/token",
		},
	}
	oauthClientID = clientID
	protocol.RegisterOAuth("soundcloud", config, New, reflect.TypeOf(&Soundcloud{}))
}