forked from Mirrors/oauth2
oauth/google: fix the broken default credentials link
Change-Id: Iceb8f2fa393a1de4dbb0ab3b85ccee1da5c2b5b7 Reviewed-on: https://go-review.googlesource.com/8474 Reviewed-by: David Symonds <dsymonds@golang.org>
This commit is contained in:
parent
c58fcf0ffc
commit
d2a4aec992
|
@ -28,7 +28,7 @@ import (
|
||||||
// and use "Application Default Credentials."
|
// and use "Application Default Credentials."
|
||||||
//
|
//
|
||||||
// For more details, see:
|
// For more details, see:
|
||||||
// https://developers.google.com/accounts/application-default-credentials
|
// https://developers.google.com/accounts/docs/application-default-credentials
|
||||||
//
|
//
|
||||||
func DefaultClient(ctx context.Context, scope ...string) (*http.Client, error) {
|
func DefaultClient(ctx context.Context, scope ...string) (*http.Client, error) {
|
||||||
ts, err := DefaultTokenSource(ctx, scope...)
|
ts, err := DefaultTokenSource(ctx, scope...)
|
||||||
|
@ -54,7 +54,7 @@ func DefaultClient(ctx context.Context, scope ...string) (*http.Client, error) {
|
||||||
// (In this final case any provided scopes are ignored.)
|
// (In this final case any provided scopes are ignored.)
|
||||||
//
|
//
|
||||||
// For more details, see:
|
// For more details, see:
|
||||||
// https://developers.google.com/accounts/application-default-credentials
|
// https://developers.google.com/accounts/docs/application-default-credentials
|
||||||
//
|
//
|
||||||
func DefaultTokenSource(ctx context.Context, scope ...string) (oauth2.TokenSource, error) {
|
func DefaultTokenSource(ctx context.Context, scope ...string) (oauth2.TokenSource, error) {
|
||||||
// First, try the environment variable.
|
// First, try the environment variable.
|
||||||
|
@ -94,7 +94,7 @@ func DefaultTokenSource(ctx context.Context, scope ...string) (oauth2.TokenSourc
|
||||||
}
|
}
|
||||||
|
|
||||||
// None are found; return helpful error.
|
// None are found; return helpful error.
|
||||||
const url = "https://developers.google.com/accounts/application-default-credentials"
|
const url = "https://developers.google.com/accounts/docs/application-default-credentials"
|
||||||
return nil, fmt.Errorf("google: could not find default credentials. See %v for more information.", url)
|
return nil, fmt.Errorf("google: could not find default credentials. See %v for more information.", url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
// For more information, please read
|
// For more information, please read
|
||||||
// https://developers.google.com/accounts/docs/OAuth2
|
// https://developers.google.com/accounts/docs/OAuth2
|
||||||
// and
|
// and
|
||||||
// https://developers.google.com/accounts/application-default-credentials.
|
// https://developers.google.com/accounts/docs/application-default-credentials.
|
||||||
package google // import "golang.org/x/oauth2/google"
|
package google // import "golang.org/x/oauth2/google"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
Loading…
Reference in New Issue