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

Unified Diff: appengine/findit/common/auth_util.py

Issue 1960353002: [Findit] Use gerric scope instead of email scope to authorize findit to internal buildspec/ (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Update doc string. Created 4 years, 7 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 | « no previous file | appengine/findit/common/http_client_appengine.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/common/auth_util.py
diff --git a/appengine/findit/common/auth_util.py b/appengine/findit/common/auth_util.py
index e9fe427e9ec6d977c355998b2fb4e9443cf307e5..443ed058e82b64103266e72fa89c89f71294ff41 100644
--- a/appengine/findit/common/auth_util.py
+++ b/appengine/findit/common/auth_util.py
@@ -8,7 +8,7 @@ from google.appengine.api.app_identity import app_identity
_EMAIL_SCOPE = 'https://www.googleapis.com/auth/userinfo.email'
-def GetAuthToken(): # pragma: no cover
- """Gets auth token for requests to swarming server and isolated server."""
- auth_token, _ = app_identity.get_access_token(_EMAIL_SCOPE)
+def GetAuthToken(scope=_EMAIL_SCOPE): # pragma: no cover
+ """Gets auth token for requests to hosts that need authorizations."""
+ auth_token, _ = app_identity.get_access_token(scope)
return auth_token
« no previous file with comments | « no previous file | appengine/findit/common/http_client_appengine.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698