{"action":"created","comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/comments/58933406","id":58933406,"diff_hunk":"@@ -95,14 +96,10 @@ class ClientConnectionManager extends EventEmitter {\n         this.emit(EMIT_CONNECTION_OPENED, connection);\n     }\n \n-    private authenticate(connection: ClientConnection): Q.Promise<boolean> {\n-        var name = this.client.getConfig().groupConfig.name;\n-        var password = this.client.getConfig().groupConfig.password;\n-        var invocationService = this.client.getInvocationService();\n-\n-        var authenticator = new ConnectionAuthenticator(connection, invocationService, name, password);\n+    private authenticate(connection: ClientConnection, ownerConnection: boolean): Q.Promise<boolean> {\n+        var authenticator = new ConnectionAuthenticator(connection, this.client);","path":"src/invocation/ClientConnectionManager.ts","position":30,"original_position":30,"commit_id":"d3f3d1a1e6fe07e32332d7e73ec98805d7250f06","original_commit_id":"d3f3d1a1e6fe07e32332d7e73ec98805d7250f06","user":{"login":"mustafaiman","id":6582349,"avatar_url":"https://avatars.githubusercontent.com/u/6582349?v=3","gravatar_id":"","url":"https://api.github.com/users/mustafaiman","html_url":"https://github.com/mustafaiman","followers_url":"https://api.github.com/users/mustafaiman/followers","following_url":"https://api.github.com/users/mustafaiman/following{/other_user}","gists_url":"https://api.github.com/users/mustafaiman/gists{/gist_id}","starred_url":"https://api.github.com/users/mustafaiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mustafaiman/subscriptions","organizations_url":"https://api.github.com/users/mustafaiman/orgs","repos_url":"https://api.github.com/users/mustafaiman/repos","events_url":"https://api.github.com/users/mustafaiman/events{/privacy}","received_events_url":"https://api.github.com/users/mustafaiman/received_events","type":"User","site_admin":false},"body":"Isn't it better if you pass `ownerConnection` to constructor and then call `authenticator.authenticate()`. I think passing the argument to .authenticate creates the impression that the same authenticator will be used with different argument later although it will not.\r\nBut not a big deal.","created_at":"2016-04-07T19:48:59Z","updated_at":"2016-04-07T19:48:59Z","html_url":"https://github.com/hazelcast/hazelcast-nodejs-client/pull/76#discussion_r58933406","pull_request_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/comments/58933406"},"html":{"href":"https://github.com/hazelcast/hazelcast-nodejs-client/pull/76#discussion_r58933406"},"pull_request":{"href":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/76","id":65636099,"html_url":"https://github.com/hazelcast/hazelcast-nodejs-client/pull/76","diff_url":"https://github.com/hazelcast/hazelcast-nodejs-client/pull/76.diff","patch_url":"https://github.com/hazelcast/hazelcast-nodejs-client/pull/76.patch","issue_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/76","number":76,"state":"open","locked":false,"title":"Client UUID and Owner UUID are correctly set to secondary connections","user":{"login":"GhostInAMachine","id":11163575,"avatar_url":"https://avatars.githubusercontent.com/u/11163575?v=3","gravatar_id":"","url":"https://api.github.com/users/GhostInAMachine","html_url":"https://github.com/GhostInAMachine","followers_url":"https://api.github.com/users/GhostInAMachine/followers","following_url":"https://api.github.com/users/GhostInAMachine/following{/other_user}","gists_url":"https://api.github.com/users/GhostInAMachine/gists{/gist_id}","starred_url":"https://api.github.com/users/GhostInAMachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GhostInAMachine/subscriptions","organizations_url":"https://api.github.com/users/GhostInAMachine/orgs","repos_url":"https://api.github.com/users/GhostInAMachine/repos","events_url":"https://api.github.com/users/GhostInAMachine/events{/privacy}","received_events_url":"https://api.github.com/users/GhostInAMachine/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-07T14:08:42Z","updated_at":"2016-04-07T19:48:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49d440041ac4de384fc1fdf581248787e5822e32","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/76/commits","review_comments_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/76/comments","review_comment_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/76/comments","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/statuses/d3f3d1a1e6fe07e32332d7e73ec98805d7250f06","head":{"label":"GhostInAMachine:OwnerConnectionUUID","ref":"OwnerConnectionUUID","sha":"d3f3d1a1e6fe07e32332d7e73ec98805d7250f06","user":{"login":"GhostInAMachine","id":11163575,"avatar_url":"https://avatars.githubusercontent.com/u/11163575?v=3","gravatar_id":"","url":"https://api.github.com/users/GhostInAMachine","html_url":"https://github.com/GhostInAMachine","followers_url":"https://api.github.com/users/GhostInAMachine/followers","following_url":"https://api.github.com/users/GhostInAMachine/following{/other_user}","gists_url":"https://api.github.com/users/GhostInAMachine/gists{/gist_id}","starred_url":"https://api.github.com/users/GhostInAMachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GhostInAMachine/subscriptions","organizations_url":"https://api.github.com/users/GhostInAMachine/orgs","repos_url":"https://api.github.com/users/GhostInAMachine/repos","events_url":"https://api.github.com/users/GhostInAMachine/events{/privacy}","received_events_url":"https://api.github.com/users/GhostInAMachine/received_events","type":"User","site_admin":false},"repo":{"id":47989854,"name":"hazelcast-nodejs-client","full_name":"GhostInAMachine/hazelcast-nodejs-client","owner":{"login":"GhostInAMachine","id":11163575,"avatar_url":"https://avatars.githubusercontent.com/u/11163575?v=3","gravatar_id":"","url":"https://api.github.com/users/GhostInAMachine","html_url":"https://github.com/GhostInAMachine","followers_url":"https://api.github.com/users/GhostInAMachine/followers","following_url":"https://api.github.com/users/GhostInAMachine/following{/other_user}","gists_url":"https://api.github.com/users/GhostInAMachine/gists{/gist_id}","starred_url":"https://api.github.com/users/GhostInAMachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GhostInAMachine/subscriptions","organizations_url":"https://api.github.com/users/GhostInAMachine/orgs","repos_url":"https://api.github.com/users/GhostInAMachine/repos","events_url":"https://api.github.com/users/GhostInAMachine/events{/privacy}","received_events_url":"https://api.github.com/users/GhostInAMachine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GhostInAMachine/hazelcast-nodejs-client","description":"NodeJS Client for Hazelcast, using Hazelcast Open Client Protocol 1.0 for Hazelcast 3.6 and higher","fork":true,"url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client","forks_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/forks","keys_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/teams","hooks_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/hooks","issue_events_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/issues/events{/number}","events_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/events","assignees_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/assignees{/user}","branches_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/branches{/branch}","tags_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/tags","blobs_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/statuses/{sha}","languages_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/languages","stargazers_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/stargazers","contributors_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/contributors","subscribers_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/subscribers","subscription_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/subscription","commits_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/contents/{+path}","compare_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/merges","archive_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/downloads","issues_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/issues{/number}","pulls_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/pulls{/number}","milestones_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/milestones{/number}","notifications_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/labels{/name}","releases_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/releases{/id}","deployments_url":"https://api.github.com/repos/GhostInAMachine/hazelcast-nodejs-client/deployments","created_at":"2015-12-14T17:15:57Z","updated_at":"2016-03-16T08:45:04Z","pushed_at":"2016-04-07T13:56:15Z","git_url":"git://github.com/GhostInAMachine/hazelcast-nodejs-client.git","ssh_url":"git@github.com:GhostInAMachine/hazelcast-nodejs-client.git","clone_url":"https://github.com/GhostInAMachine/hazelcast-nodejs-client.git","svn_url":"https://github.com/GhostInAMachine/hazelcast-nodejs-client","homepage":null,"size":184,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hazelcast:master","ref":"master","sha":"28622cdd15185a2d33f68eedc69af30e96b25172","user":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars.githubusercontent.com/u/1453152?v=3","gravatar_id":"","url":"https://api.github.com/users/hazelcast","html_url":"https://github.com/hazelcast","followers_url":"https://api.github.com/users/hazelcast/followers","following_url":"https://api.github.com/users/hazelcast/following{/other_user}","gists_url":"https://api.github.com/users/hazelcast/gists{/gist_id}","starred_url":"https://api.github.com/users/hazelcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazelcast/subscriptions","organizations_url":"https://api.github.com/users/hazelcast/orgs","repos_url":"https://api.github.com/users/hazelcast/repos","events_url":"https://api.github.com/users/hazelcast/events{/privacy}","received_events_url":"https://api.github.com/users/hazelcast/received_events","type":"Organization","site_admin":false},"repo":{"id":45202495,"name":"hazelcast-nodejs-client","full_name":"hazelcast/hazelcast-nodejs-client","owner":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars.githubusercontent.com/u/1453152?v=3","gravatar_id":"","url":"https://api.github.com/users/hazelcast","html_url":"https://github.com/hazelcast","followers_url":"https://api.github.com/users/hazelcast/followers","following_url":"https://api.github.com/users/hazelcast/following{/other_user}","gists_url":"https://api.github.com/users/hazelcast/gists{/gist_id}","starred_url":"https://api.github.com/users/hazelcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazelcast/subscriptions","organizations_url":"https://api.github.com/users/hazelcast/orgs","repos_url":"https://api.github.com/users/hazelcast/repos","events_url":"https://api.github.com/users/hazelcast/events{/privacy}","received_events_url":"https://api.github.com/users/hazelcast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hazelcast/hazelcast-nodejs-client","description":"NodeJS Client for Hazelcast, using Hazelcast Open Client Protocol 1.0 for Hazelcast 3.6 and higher","fork":false,"url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client","forks_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/forks","keys_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/teams","hooks_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/hooks","issue_events_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/events{/number}","events_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/events","assignees_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/assignees{/user}","branches_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/branches{/branch}","tags_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/tags","blobs_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/statuses/{sha}","languages_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/languages","stargazers_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/stargazers","contributors_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/contributors","subscribers_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/subscribers","subscription_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/subscription","commits_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/contents/{+path}","compare_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/merges","archive_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/downloads","issues_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues{/number}","pulls_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls{/number}","milestones_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/milestones{/number}","notifications_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/labels{/name}","releases_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/releases{/id}","deployments_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/deployments","created_at":"2015-10-29T18:24:48Z","updated_at":"2016-03-16T08:45:04Z","pushed_at":"2016-04-07T14:08:42Z","git_url":"git://github.com/hazelcast/hazelcast-nodejs-client.git","ssh_url":"git@github.com:hazelcast/hazelcast-nodejs-client.git","clone_url":"https://github.com/hazelcast/hazelcast-nodejs-client.git","svn_url":"https://github.com/hazelcast/hazelcast-nodejs-client","homepage":null,"size":260,"stargazers_count":3,"watchers_count":3,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":21,"forks":6,"open_issues":21,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/76"},"html":{"href":"https://github.com/hazelcast/hazelcast-nodejs-client/pull/76"},"issue":{"href":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/76"},"comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/statuses/d3f3d1a1e6fe07e32332d7e73ec98805d7250f06"}}}}