Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1771)

Unified Diff: appengine/gaeauth/client/client.go

Issue 2134673003: milo: buildbucket builer view (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: rebased and regenerated expectations Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/cmd/milo/swarming/build.go ('k') | common/clock/external.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/gaeauth/client/client.go
diff --git a/appengine/gaeauth/client/client.go b/appengine/gaeauth/client/client.go
index 0a510ec4dfe6b4e73ecb16b0bbaea3da4f2e9dc3..4d77874c7dc4a40422e2b31b142e27959746a287 100644
--- a/appengine/gaeauth/client/client.go
+++ b/appengine/gaeauth/client/client.go
@@ -69,6 +69,7 @@ func Authenticator(c context.Context, scopes []string, serviceAccountJSON []byte
// Transport returns http.RoundTripper that injects Authorization headers into
// requests. It uses an authenticator returned by Authenticator.
+// If scopes is empty, uses auth.OAuthScopeEmail scope.
func Transport(c context.Context, scopes []string, serviceAccountJSON []byte) (http.RoundTripper, error) {
a, err := Authenticator(c, scopes, serviceAccountJSON)
if err != nil {
@@ -80,6 +81,7 @@ func Transport(c context.Context, scopes []string, serviceAccountJSON []byte) (h
// UseServiceAccountTransport injects authenticating transport into
// context.Context. It can be extracted back via transport.Get(c). It will be
// lazy-initialized on a first use.
+// If scopes is empty, uses auth.OAuthScopeEmail scope.
func UseServiceAccountTransport(c context.Context, scopes []string, serviceAccountJSON []byte) context.Context {
var cached http.RoundTripper
var once sync.Once
« no previous file with comments | « appengine/cmd/milo/swarming/build.go ('k') | common/clock/external.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698