aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/oauth2/google/default.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-10-18 13:15:14 +0100
committerNiall Sheridan <niall@intercom.io>2017-10-18 13:25:46 +0100
commit7b320119ba532fd409ec7dade7ad02011c309599 (patch)
treea39860f35b55e6cc499f8f5bfa969138c5dd6b73 /vendor/golang.org/x/oauth2/google/default.go
parent7c99874c7a3e7a89716f3ee0cdf696532e35ae35 (diff)
Update dependencies
Diffstat (limited to 'vendor/golang.org/x/oauth2/google/default.go')
-rw-r--r--vendor/golang.org/x/oauth2/google/default.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/golang.org/x/oauth2/google/default.go b/vendor/golang.org/x/oauth2/google/default.go
index 004ed4e..b4b6274 100644
--- a/vendor/golang.org/x/oauth2/google/default.go
+++ b/vendor/golang.org/x/oauth2/google/default.go
@@ -24,6 +24,12 @@ import (
type DefaultCredentials struct {
ProjectID string // may be empty
TokenSource oauth2.TokenSource
+
+ // JSON contains the raw bytes from a JSON credentials file.
+ // This field may be nil if authentication is provided by the
+ // environment and not with a credentials file, e.g. when code is
+ // running on Google Cloud Platform.
+ JSON []byte
}
// DefaultClient returns an HTTP Client that uses the
@@ -126,5 +132,6 @@ func readCredentialsFile(ctx context.Context, filename string, scopes []string)
return &DefaultCredentials{
ProjectID: f.ProjectID,
TokenSource: ts,
+ JSON: b,
}, nil
}