.github
alerting
client
config
controller
core
docs
example
jsonpath
k8s
k8stest
metric
pattern
security
storage
util
vendor
cloud.google.com
github.com
go.etcd.io
golang.org
x
crypto
net
oauth2
google
appengine.go
appengine_gen1.go
appengine_gen2_flex.go
default.go
doc.go
google.go
jwt.go
sdk.go
internal
jws
jwt
.travis.yml
AUTHORS
CONTRIBUTING.md
CONTRIBUTORS
LICENSE
README.md
go.mod
go.sum
oauth2.go
token.go
transport.go
sys
term
text
time
google.golang.org
gopkg.in
k8s.io
sigs.k8s.io
modules.txt
watchdog
web
.dockerignore
.gitattributes
.gitignore
Dockerfile
LICENSE.md
Makefile
README.md
config.yaml
go.mod
go.sum
main.go
41 lines
1.9 KiB
Go
41 lines
1.9 KiB
Go
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Package google provides support for making OAuth2 authorized and authenticated
|
|
// HTTP requests to Google APIs. It supports the Web server flow, client-side
|
|
// credentials, service accounts, Google Compute Engine service accounts, and Google
|
|
// App Engine service accounts.
|
|
//
|
|
// A brief overview of the package follows. For more information, please read
|
|
// https://developers.google.com/accounts/docs/OAuth2
|
|
// and
|
|
// https://developers.google.com/accounts/docs/application-default-credentials.
|
|
//
|
|
// OAuth2 Configs
|
|
//
|
|
// Two functions in this package return golang.org/x/oauth2.Config values from Google credential
|
|
// data. Google supports two JSON formats for OAuth2 credentials: one is handled by ConfigFromJSON,
|
|
// the other by JWTConfigFromJSON. The returned Config can be used to obtain a TokenSource or
|
|
// create an http.Client.
|
|
//
|
|
//
|
|
// Credentials
|
|
//
|
|
// The Credentials type represents Google credentials, including Application Default
|
|
// Credentials.
|
|
//
|
|
// Use FindDefaultCredentials to obtain Application Default Credentials.
|
|
// FindDefaultCredentials looks in some well-known places for a credentials file, and
|
|
// will call AppEngineTokenSource or ComputeTokenSource as needed.
|
|
//
|
|
// DefaultClient and DefaultTokenSource are convenience methods. They first call FindDefaultCredentials,
|
|
// then use the credentials to construct an http.Client or an oauth2.TokenSource.
|
|
//
|
|
// Use CredentialsFromJSON to obtain credentials from either of the two JSON formats
|
|
// described in OAuth2 Configs, above. The TokenSource in the returned value is the
|
|
// same as the one obtained from the oauth2.Config returned from ConfigFromJSON or
|
|
// JWTConfigFromJSON, but the Credentials may contain additional information
|
|
// that is useful is some circumstances.
|
|
package google // import "golang.org/x/oauth2/google"
|