forked from Mirrors/oauth2
oauth2: fix stale docs
NewTransportWithCode no longer exists. Change-Id: Iccb1abc5700ecc97d6bd73313c88676e19f2c396 Reviewed-on: https://go-review.googlesource.com/25118 Reviewed-by: Mike Wiacek <mjwiacek@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
12e1e98615
commit
1364adb2c6
|
@ -27,10 +27,10 @@ func ExampleConfig() {
|
||||||
url := conf.AuthCodeURL("state", oauth2.AccessTypeOffline)
|
url := conf.AuthCodeURL("state", oauth2.AccessTypeOffline)
|
||||||
fmt.Printf("Visit the URL for the auth dialog: %v", url)
|
fmt.Printf("Visit the URL for the auth dialog: %v", url)
|
||||||
|
|
||||||
// Use the authorization code that is pushed to the redirect URL.
|
// Use the authorization code that is pushed to the redirect
|
||||||
// NewTransportWithCode will do the handshake to retrieve
|
// URL. Exchange will do the handshake to retrieve the
|
||||||
// an access token and initiate a Transport that is
|
// initial access token. The HTTP Client returned by
|
||||||
// authorized and authenticated by the retrieved token.
|
// conf.Client will refresh the token as necessary.
|
||||||
var code string
|
var code string
|
||||||
if _, err := fmt.Scan(&code); err != nil {
|
if _, err := fmt.Scan(&code); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
Loading…
Reference in New Issue