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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | appengine/findit/common/http_client_appengine.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from google.appengine.api.app_identity import app_identity 5 from google.appengine.api.app_identity import app_identity
6 6
7 7
8 _EMAIL_SCOPE = 'https://www.googleapis.com/auth/userinfo.email' 8 _EMAIL_SCOPE = 'https://www.googleapis.com/auth/userinfo.email'
9 9
10 10
11 def GetAuthToken(): # pragma: no cover 11 def GetAuthToken(scope=_EMAIL_SCOPE): # pragma: no cover
12 """Gets auth token for requests to swarming server and isolated server.""" 12 """Gets auth token for requests to hosts that need authorizations."""
13 auth_token, _ = app_identity.get_access_token(_EMAIL_SCOPE) 13 auth_token, _ = app_identity.get_access_token(scope)
14 return auth_token 14 return auth_token
OLDNEW
« 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