diff options
author | Tim Emiola <tbetbetbe@users.noreply.github.com> | 2015-09-02 16:37:00 -0700 |
---|---|---|
committer | Tim Emiola <tbetbetbe@users.noreply.github.com> | 2015-09-02 16:37:00 -0700 |
commit | e856ccd16fbcfe8df839139c4ed85de73fec5965 (patch) | |
tree | c4760e05f5b60c0b5b01e2d446fd1576059a1295 /src | |
parent | 55b3ee531029b39d7afe631bf0346c11f5cee09f (diff) | |
parent | c9f43e5cc3820353fc9055ce6a30f6e36ca79b27 (diff) |
Merge pull request #3192 from murgatroid99/node_auth_interop_fix
Fix bugs that were causing auth interop tests to fail
Diffstat (limited to 'src')
-rw-r--r-- | src/node/interop/interop_client.js | 8 | ||||
-rw-r--r-- | src/node/src/client.js | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index 6a8d2633ca..215d42121c 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -44,7 +44,7 @@ var assert = require('assert'); var AUTH_SCOPE = 'https://www.googleapis.com/auth/xapi.zoo'; var AUTH_SCOPE_RESPONSE = 'xapi.zoo'; -var AUTH_USER = ('155450119199-3psnrh1sdr3d8cpj1v46naggf81mhdnk' + +var AUTH_USER = ('155450119199-vefjjaekcc6cmsd5914v6lqufunmh9ue' + '@developer.gserviceaccount.com'); var COMPUTE_ENGINE_USER = ('155450119199-r5aaqa2vqoa9g5mv2m6s3m1l293rlmel' + '@developer.gserviceaccount.com'); @@ -321,7 +321,7 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) { credential.getAccessToken(function(err, token) { assert.ifError(err); var updateMetadata = function(authURI, metadata, callback) { - metadata.Add('authorization', 'Bearer ' + token); + metadata.add('authorization', 'Bearer ' + token); callback(null, metadata); }; var makeTestCall = function(error, client_metadata) { @@ -336,10 +336,10 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) { }, client_metadata); }; if (per_rpc) { - updateMetadata('', {}, makeTestCall); + updateMetadata('', new grpc.Metadata(), makeTestCall); } else { client.$updateMetadata = updateMetadata; - makeTestCall(null, {}); + makeTestCall(null, new grpc.Metadata()); } }); }); diff --git a/src/node/src/client.js b/src/node/src/client.js index b427297a8a..7f510231b3 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -637,7 +637,7 @@ exports.makeClientConstructor = function(methods, serviceName) { // Remove the optional DNS scheme, trailing port, and trailing backslash address = address.replace(/^(dns:\/{3})?([^:\/]+)(:\d+)?\/?$/, '$2'); this.$server_address = address; - this.$auth_uri = 'https://' + this.server_address + '/' + serviceName; + this.$auth_uri = 'https://' + this.$server_address + '/' + serviceName; this.$updateMetadata = updateMetadata; } |