From 6a8eb7dcdc65d7c2860588c2febab6ad35fe5f3e Mon Sep 17 00:00:00 2001 From: Bochun Zhang Date: Wed, 10 Aug 2016 10:24:42 -0700 Subject: [PATCH] Use URIs in provided json instead of default one. For both service account secret and client secret, there are URIs such as token_uri, auth_uri in the token. We should use whatever provided in the token instead of default to production oauth2 addresses. --- oauth2l/__init__.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/oauth2l/__init__.py b/oauth2l/__init__.py index a0f3570a..048a1b47 100644 --- a/oauth2l/__init__.py +++ b/oauth2l/__init__.py @@ -101,12 +101,7 @@ def GetClientInfoFromFile(client_secrets): client_secrets = json.load(client_secrets_file) if 'installed' not in client_secrets: raise ValueError('Provided client ID must be for an installed app') - client_secrets = client_secrets['installed'] - return { - 'client_id': client_secrets['client_id'], - 'client_secret': client_secrets['client_secret'], - 'user_agent': _DEFAULT_USER_AGENT, - } + return client_secrets['installed'] def _ExpandScopes(scopes):