Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
e856ccd1
Commit
e856ccd1
authored
9 years ago
by
Tim Emiola
Browse files
Options
Downloads
Plain Diff
Merge pull request #3192 from murgatroid99/node_auth_interop_fix
Fix bugs that were causing auth interop tests to fail
parents
55b3ee53
c9f43e5c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/node/interop/interop_client.js
+4
-4
4 additions, 4 deletions
src/node/interop/interop_client.js
src/node/src/client.js
+1
-1
1 addition, 1 deletion
src/node/src/client.js
with
5 additions
and
5 deletions
src/node/interop/interop_client.js
+
4
−
4
View file @
e856ccd1
...
@@ -44,7 +44,7 @@ var assert = require('assert');
...
@@ -44,7 +44,7 @@ var assert = require('assert');
var
AUTH_SCOPE
=
'
https://www.googleapis.com/auth/xapi.zoo
'
;
var
AUTH_SCOPE
=
'
https://www.googleapis.com/auth/xapi.zoo
'
;
var
AUTH_SCOPE_RESPONSE
=
'
xapi.zoo
'
;
var
AUTH_SCOPE_RESPONSE
=
'
xapi.zoo
'
;
var
AUTH_USER
=
(
'
155450119199-
3psnrh1sdr3d8cpj1v46naggf81mhdnk
'
+
var
AUTH_USER
=
(
'
155450119199-
vefjjaekcc6cmsd5914v6lqufunmh9ue
'
+
'
@developer.gserviceaccount.com
'
);
'
@developer.gserviceaccount.com
'
);
var
COMPUTE_ENGINE_USER
=
(
'
155450119199-r5aaqa2vqoa9g5mv2m6s3m1l293rlmel
'
+
var
COMPUTE_ENGINE_USER
=
(
'
155450119199-r5aaqa2vqoa9g5mv2m6s3m1l293rlmel
'
+
'
@developer.gserviceaccount.com
'
);
'
@developer.gserviceaccount.com
'
);
...
@@ -321,7 +321,7 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) {
...
@@ -321,7 +321,7 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) {
credential
.
getAccessToken
(
function
(
err
,
token
)
{
credential
.
getAccessToken
(
function
(
err
,
token
)
{
assert
.
ifError
(
err
);
assert
.
ifError
(
err
);
var
updateMetadata
=
function
(
authURI
,
metadata
,
callback
)
{
var
updateMetadata
=
function
(
authURI
,
metadata
,
callback
)
{
metadata
.
A
dd
(
'
authorization
'
,
'
Bearer
'
+
token
);
metadata
.
a
dd
(
'
authorization
'
,
'
Bearer
'
+
token
);
callback
(
null
,
metadata
);
callback
(
null
,
metadata
);
};
};
var
makeTestCall
=
function
(
error
,
client_metadata
)
{
var
makeTestCall
=
function
(
error
,
client_metadata
)
{
...
@@ -336,10 +336,10 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) {
...
@@ -336,10 +336,10 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) {
},
client_metadata
);
},
client_metadata
);
};
};
if
(
per_rpc
)
{
if
(
per_rpc
)
{
updateMetadata
(
''
,
{}
,
makeTestCall
);
updateMetadata
(
''
,
new
grpc
.
Metadata
()
,
makeTestCall
);
}
else
{
}
else
{
client
.
$updateMetadata
=
updateMetadata
;
client
.
$updateMetadata
=
updateMetadata
;
makeTestCall
(
null
,
{}
);
makeTestCall
(
null
,
new
grpc
.
Metadata
()
);
}
}
});
});
});
});
...
...
This diff is collapsed.
Click to expand it.
src/node/src/client.js
+
1
−
1
View file @
e856ccd1
...
@@ -637,7 +637,7 @@ exports.makeClientConstructor = function(methods, serviceName) {
...
@@ -637,7 +637,7 @@ exports.makeClientConstructor = function(methods, serviceName) {
// Remove the optional DNS scheme, trailing port, and trailing backslash
// Remove the optional DNS scheme, trailing port, and trailing backslash
address
=
address
.
replace
(
/^
(
dns:
\/{3})?([^
:
\/]
+
)(
:
\d
+
)?\/?
$/
,
'
$2
'
);
address
=
address
.
replace
(
/^
(
dns:
\/{3})?([^
:
\/]
+
)(
:
\d
+
)?\/?
$/
,
'
$2
'
);
this
.
$server_address
=
address
;
this
.
$server_address
=
address
;
this
.
$auth_uri
=
'
https://
'
+
this
.
server_address
+
'
/
'
+
serviceName
;
this
.
$auth_uri
=
'
https://
'
+
this
.
$
server_address
+
'
/
'
+
serviceName
;
this
.
$updateMetadata
=
updateMetadata
;
this
.
$updateMetadata
=
updateMetadata
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment