Merge two approaches for GAM header on SA

- Ross approach put headers on both SA token generation request and API calls
- Jay approach appending to existing header if it exists
This commit is contained in:
Jay Lee
2017-12-21 10:12:46 -05:00
parent 14fab0293e
commit 134f170726
2 changed files with 6 additions and 6 deletions

View File

@ -547,7 +547,6 @@ def getSvcAcctCredentials(scopes, act_as):
credentials = google.oauth2.service_account.Credentials.from_service_account_info(GM_Globals[GM_OAUTH2SERVICE_JSON_DATA])
credentials = credentials.with_scopes(scopes)
credentials = credentials.with_subject(act_as)
# TODO: figure out how to set user agent
GM_Globals[GM_OAUTH2SERVICE_ACCOUNT_CLIENT_ID] = GM_Globals[GM_OAUTH2SERVICE_JSON_DATA]['client_id']
return credentials
except (ValueError, KeyError):