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)
|
||||
fmt.Printf("Visit the URL for the auth dialog: %v", url)
|
||||
|
||||
// Use the authorization code that is pushed to the redirect URL.
|
||||
// NewTransportWithCode will do the handshake to retrieve
|
||||
// an access token and initiate a Transport that is
|
||||
// authorized and authenticated by the retrieved token.
|
||||
// Use the authorization code that is pushed to the redirect
|
||||
// URL. Exchange will do the handshake to retrieve the
|
||||
// initial access token. The HTTP Client returned by
|
||||
// conf.Client will refresh the token as necessary.
|
||||
var code string
|
||||
if _, err := fmt.Scan(&code); err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
Loading…
Reference in New Issue