Merge pull request #1273 from soltanmm/auth-interop

Fix Python auth and interop test
pull/1124/head^2
Tim Emiola 10 years ago
commit 884d29725b
  1. 2
      src/python/interop/interop/client.py
  2. 2
      src/python/interop/interop/methods.py
  3. 3
      src/python/src/grpc/early_adopter/implementations.py

@ -64,7 +64,7 @@ def _args():
return parser.parse_args()
def _oauth_access_token(args):
credentials = client.GoogleCredentials.get_application_default()
credentials = oauth2client_client.GoogleCredentials.get_application_default()
scoped_credentials = credentials.create_scoped([args.oauth_scope])
return scoped_credentials.get_access_token().access_token

@ -292,7 +292,7 @@ def _service_account_creds(stub, args):
if wanted_email != response.username:
raise ValueError(
'expected username %s, got %s' % (wanted_email, response.username))
if response.oauth_scope in args.oauth_scope:
if args.oauth_scope.find(response.oauth_scope) == -1:
raise ValueError(
'expected to find oauth scope "%s" in received "%s"' %
(response.oauth_scope, args.oauth_scope))

@ -223,7 +223,8 @@ def stub(
breakdown = _face_utilities.break_down_invocation(service_name, methods)
return _Stub(
breakdown, host, port, secure, root_certificates, private_key,
certificate_chain, server_host_override=server_host_override)
certificate_chain, server_host_override=server_host_override,
metadata_transformer=metadata_transformer)
def server(

Loading…
Cancel
Save