diff options
author | 2015-10-19 19:33:24 -0700 | |
---|---|---|
committer | 2015-10-19 19:33:24 -0700 | |
commit | 3b6fef129212155cb34f8cb36c0e328decb6aa8f (patch) | |
tree | 36f6e4935d72552f5775104f062234adac37d1d9 /src/python | |
parent | e2a1bf46f975a47497977a19a556dd9f07ae944a (diff) |
fix some python auth interop tests
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/grpcio_test/grpc_interop/client.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/python/grpcio_test/grpc_interop/client.py b/src/python/grpcio_test/grpc_interop/client.py index 01928886b4..21e344ca35 100644 --- a/src/python/grpcio_test/grpc_interop/client.py +++ b/src/python/grpcio_test/grpc_interop/client.py @@ -71,12 +71,17 @@ def _oauth_access_token(args): def _stub(args): if args.oauth_scope: if args.test_case == 'oauth2_auth_token': + # TODO(jtattermusch): This testcase sets the auth metadata key-value + # manually, which also means that the user would need to do the same + # thing every time he/she would like to use and out of band oauth token. + # The transformer function that produces the metadata key-value from + # the access token should be provided by gRPC auth library. access_token = _oauth_access_token(args) metadata_transformer = lambda x: [ - ('Authorization', 'Bearer %s' % access_token)] + ('authorization', 'Bearer %s' % access_token)] else: metadata_transformer = lambda x: [ - ('Authorization', 'Bearer %s' % _oauth_access_token(args))] + ('authorization', 'Bearer %s' % _oauth_access_token(args))] else: metadata_transformer = lambda x: [] if args.use_tls: |