Index: impl/prod/context.go |
diff --git a/impl/prod/context.go b/impl/prod/context.go |
index 8a613253d2aa4cd85cc42a80895cc36ee07d1da8..92cb8af809de554a8206e186c7c277f577b67e85 100644 |
--- a/impl/prod/context.go |
+++ b/impl/prod/context.go |
@@ -19,6 +19,13 @@ import ( |
"google.golang.org/appengine/remote_api" |
) |
+// RemoteAPIScopes is the set of OAuth2 scopes needed for Remote API access. |
+var RemoteAPIScopes = []string{ |
dnj
2016/01/26 05:21:35
This is useful when using external authentication
|
+ "https://www.googleapis.com/auth/appengine.apis", |
+ "https://www.googleapis.com/auth/userinfo.email", |
+ "https://www.googleapis.com/auth/cloud.platform", |
+} |
+ |
type key int |
var ( |
@@ -139,11 +146,7 @@ func UseRemote(inOutCtx *context.Context, host string, client *http.Client) (err |
if aeCtx == nil { |
aeCtx = context.Background() |
} |
- client, err = gOAuth.DefaultClient(aeCtx, |
- "https://www.googleapis.com/auth/appengine.apis", |
- "https://www.googleapis.com/auth/userinfo.email", |
- "https://www.googleapis.com/auth/cloud.platform", |
- ) |
+ client, err = gOAuth.DefaultClient(aeCtx, RemoteAPIScopes...) |
if err != nil { |
return |
} |