Skip to content

Commit 6f0e150

Browse files
committed
Fixes from code review
1 parent dc91725 commit 6f0e150

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/v1/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default {
3838
return {scheme: "basic", principal: username, credentials: password};
3939
}
4040
},
41-
custom: (principal, credentials, realm, scheme = "basic", parameters = undefined ) => {
41+
custom: (principal, credentials, realm, scheme, parameters = undefined ) => {
4242
if (parameters) {
4343
return {scheme: scheme, principal: principal, credentials: credentials, realm: realm,
4444
parameters: parameters}

test/v1/driver.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,19 @@ describe('driver', function() {
7676
driver.session();
7777
});
7878

79+
it('should be possible to pass a realm with basic auth tokens', function(done) {
80+
// Given
81+
var driver = neo4j.driver("bolt://localhost", neo4j.auth.basic("neo4j", "neo4j", "native"));
82+
83+
// Expect
84+
driver.onCompleted = function (meta) {
85+
done();
86+
};
87+
88+
// When
89+
driver.session();
90+
});
91+
7992
it('should be possible to create custom auth tokens', function(done) {
8093
// Given
8194
var driver = neo4j.driver("bolt://localhost", neo4j.auth.custom("neo4j", "neo4j", "native", "basic"));

0 commit comments

Comments
 (0)