Archived
1
0

Sync with golang/oauth2

This commit is contained in:
Arnaud Ysmal 2014-08-14 22:45:47 +02:00
parent eb9bd0a1ae
commit 67aa2e3d8c

View File

@ -225,7 +225,7 @@ func (db *Dropbox) AccessToken() string {
} }
func (db *Dropbox) client() *http.Client { func (db *Dropbox) client() *http.Client {
var t oauth2.Transport var t *oauth2.Transport
t = db.config.NewTransport() t = db.config.NewTransport()
t.SetToken(db.token) t.SetToken(db.token)
@ -235,7 +235,7 @@ func (db *Dropbox) client() *http.Client {
// Auth displays the URL to authorize this application to connect to your account. // Auth displays the URL to authorize this application to connect to your account.
func (db *Dropbox) Auth() error { func (db *Dropbox) Auth() error {
var code string var code string
var t oauth2.Transport var t *oauth2.Transport
var err error var err error
fmt.Printf("Please visit:\n%s\nEnter the code: ", fmt.Printf("Please visit:\n%s\nEnter the code: ",