{"action":"created","comment":{"url":"https://api.github.com/repos/MysteriumNetwork/node/pulls/comments/189512466","pull_request_review_id":121699692,"id":189512466,"diff_hunk":"@@ -23,21 +23,26 @@ import (\n \t\"strings\"\n )\n \n-// CredentialsChecker callback checks given auth primitives (i.e. customer identity signature / node's sessionId)\n-type CredentialsChecker func(username, password string) (bool, error)\n-\n type middleware struct {\n-\tcheckCredentials CredentialsChecker\n-\tcommandWriter    management.Connection\n-\tcurrentEvent     clientEvent\n+\tcredentialsValidator CredentialsChecker","path":"openvpn/middlewares/server/auth/middleware.go","position":11,"original_position":11,"commit_id":"60df77186ae76523ee7559afc81906667c387e57","original_commit_id":"60df77186ae76523ee7559afc81906667c387e57","user":{"login":"tadovas","id":1046590,"avatar_url":"https://avatars3.githubusercontent.com/u/1046590?v=4","gravatar_id":"","url":"https://api.github.com/users/tadovas","html_url":"https://github.com/tadovas","followers_url":"https://api.github.com/users/tadovas/followers","following_url":"https://api.github.com/users/tadovas/following{/other_user}","gists_url":"https://api.github.com/users/tadovas/gists{/gist_id}","starred_url":"https://api.github.com/users/tadovas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadovas/subscriptions","organizations_url":"https://api.github.com/users/tadovas/orgs","repos_url":"https://api.github.com/users/tadovas/repos","events_url":"https://api.github.com/users/tadovas/events{/privacy}","received_events_url":"https://api.github.com/users/tadovas/received_events","type":"User","site_admin":false},"body":" I think that instead of having more and more depenencies on each use case (validating, cleaning) maybe an event channel could be a more generic solution, and middleware will have well defined purpose - generating events from incoming client messages through management connection and passing them up","created_at":"2018-05-21T07:25:38Z","updated_at":"2018-05-21T07:31:38Z","html_url":"https://github.com/MysteriumNetwork/node/pull/248#discussion_r189512466","pull_request_url":"https://api.github.com/repos/MysteriumNetwork/node/pulls/248","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/MysteriumNetwork/node/pulls/comments/189512466"},"html":{"href":"https://github.com/MysteriumNetwork/node/pull/248#discussion_r189512466"},"pull_request":{"href":"https://api.github.com/repos/MysteriumNetwork/node/pulls/248"}}},"pull_request":{"url":"https://api.github.com/repos/MysteriumNetwork/node/pulls/248","id":189001433,"html_url":"https://github.com/MysteriumNetwork/node/pull/248","diff_url":"https://github.com/MysteriumNetwork/node/pull/248.diff","patch_url":"https://github.com/MysteriumNetwork/node/pull/248.patch","issue_url":"https://api.github.com/repos/MysteriumNetwork/node/issues/248","number":248,"state":"open","locked":false,"title":"Feature/myst 497 improve session authorisation","user":{"login":"zolia","id":13434315,"avatar_url":"https://avatars3.githubusercontent.com/u/13434315?v=4","gravatar_id":"","url":"https://api.github.com/users/zolia","html_url":"https://github.com/zolia","followers_url":"https://api.github.com/users/zolia/followers","following_url":"https://api.github.com/users/zolia/following{/other_user}","gists_url":"https://api.github.com/users/zolia/gists{/gist_id}","starred_url":"https://api.github.com/users/zolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zolia/subscriptions","organizations_url":"https://api.github.com/users/zolia/orgs","repos_url":"https://api.github.com/users/zolia/repos","events_url":"https://api.github.com/users/zolia/events{/privacy}","received_events_url":"https://api.github.com/users/zolia/received_events","type":"User","site_admin":false},"body":"- prohibit second client with the same credentials\r\n- cleanup session after client disconnects\r\n- fixed bogus tests\r\n- added new test","created_at":"2018-05-18T11:45:30Z","updated_at":"2018-05-21T07:31:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba7a62f42d0ebd51b54b0376c222984c58936c85","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Waldz","id":2713911,"avatar_url":"https://avatars1.githubusercontent.com/u/2713911?v=4","gravatar_id":"","url":"https://api.github.com/users/Waldz","html_url":"https://github.com/Waldz","followers_url":"https://api.github.com/users/Waldz/followers","following_url":"https://api.github.com/users/Waldz/following{/other_user}","gists_url":"https://api.github.com/users/Waldz/gists{/gist_id}","starred_url":"https://api.github.com/users/Waldz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waldz/subscriptions","organizations_url":"https://api.github.com/users/Waldz/orgs","repos_url":"https://api.github.com/users/Waldz/repos","events_url":"https://api.github.com/users/Waldz/events{/privacy}","received_events_url":"https://api.github.com/users/Waldz/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/MysteriumNetwork/node/pulls/248/commits","review_comments_url":"https://api.github.com/repos/MysteriumNetwork/node/pulls/248/comments","review_comment_url":"https://api.github.com/repos/MysteriumNetwork/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MysteriumNetwork/node/issues/248/comments","statuses_url":"https://api.github.com/repos/MysteriumNetwork/node/statuses/60df77186ae76523ee7559afc81906667c387e57","head":{"label":"MysteriumNetwork:feature/MYST-497-improve-session-authorisation","ref":"feature/MYST-497-improve-session-authorisation","sha":"60df77186ae76523ee7559afc81906667c387e57","user":{"login":"MysteriumNetwork","id":23056638,"avatar_url":"https://avatars3.githubusercontent.com/u/23056638?v=4","gravatar_id":"","url":"https://api.github.com/users/MysteriumNetwork","html_url":"https://github.com/MysteriumNetwork","followers_url":"https://api.github.com/users/MysteriumNetwork/followers","following_url":"https://api.github.com/users/MysteriumNetwork/following{/other_user}","gists_url":"https://api.github.com/users/MysteriumNetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/MysteriumNetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MysteriumNetwork/subscriptions","organizations_url":"https://api.github.com/users/MysteriumNetwork/orgs","repos_url":"https://api.github.com/users/MysteriumNetwork/repos","events_url":"https://api.github.com/users/MysteriumNetwork/events{/privacy}","received_events_url":"https://api.github.com/users/MysteriumNetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":80073079,"name":"node","full_name":"MysteriumNetwork/node","owner":{"login":"MysteriumNetwork","id":23056638,"avatar_url":"https://avatars3.githubusercontent.com/u/23056638?v=4","gravatar_id":"","url":"https://api.github.com/users/MysteriumNetwork","html_url":"https://github.com/MysteriumNetwork","followers_url":"https://api.github.com/users/MysteriumNetwork/followers","following_url":"https://api.github.com/users/MysteriumNetwork/following{/other_user}","gists_url":"https://api.github.com/users/MysteriumNetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/MysteriumNetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MysteriumNetwork/subscriptions","organizations_url":"https://api.github.com/users/MysteriumNetwork/orgs","repos_url":"https://api.github.com/users/MysteriumNetwork/repos","events_url":"https://api.github.com/users/MysteriumNetwork/events{/privacy}","received_events_url":"https://api.github.com/users/MysteriumNetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MysteriumNetwork/node","description":"Mysterium Node - VPN server and client for Mysterium Network","fork":false,"url":"https://api.github.com/repos/MysteriumNetwork/node","forks_url":"https://api.github.com/repos/MysteriumNetwork/node/forks","keys_url":"https://api.github.com/repos/MysteriumNetwork/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MysteriumNetwork/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MysteriumNetwork/node/teams","hooks_url":"https://api.github.com/repos/MysteriumNetwork/node/hooks","issue_events_url":"https://api.github.com/repos/MysteriumNetwork/node/issues/events{/number}","events_url":"https://api.github.com/repos/MysteriumNetwork/node/events","assignees_url":"https://api.github.com/repos/MysteriumNetwork/node/assignees{/user}","branches_url":"https://api.github.com/repos/MysteriumNetwork/node/branches{/branch}","tags_url":"https://api.github.com/repos/MysteriumNetwork/node/tags","blobs_url":"https://api.github.com/repos/MysteriumNetwork/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MysteriumNetwork/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MysteriumNetwork/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/MysteriumNetwork/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MysteriumNetwork/node/statuses/{sha}","languages_url":"https://api.github.com/repos/MysteriumNetwork/node/languages","stargazers_url":"https://api.github.com/repos/MysteriumNetwork/node/stargazers","contributors_url":"https://api.github.com/repos/MysteriumNetwork/node/contributors","subscribers_url":"https://api.github.com/repos/MysteriumNetwork/node/subscribers","subscription_url":"https://api.github.com/repos/MysteriumNetwork/node/subscription","commits_url":"https://api.github.com/repos/MysteriumNetwork/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/MysteriumNetwork/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/MysteriumNetwork/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/MysteriumNetwork/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/MysteriumNetwork/node/contents/{+path}","compare_url":"https://api.github.com/repos/MysteriumNetwork/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MysteriumNetwork/node/merges","archive_url":"https://api.github.com/repos/MysteriumNetwork/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MysteriumNetwork/node/downloads","issues_url":"https://api.github.com/repos/MysteriumNetwork/node/issues{/number}","pulls_url":"https://api.github.com/repos/MysteriumNetwork/node/pulls{/number}","milestones_url":"https://api.github.com/repos/MysteriumNetwork/node/milestones{/number}","notifications_url":"https://api.github.com/repos/MysteriumNetwork/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MysteriumNetwork/node/labels{/name}","releases_url":"https://api.github.com/repos/MysteriumNetwork/node/releases{/id}","deployments_url":"https://api.github.com/repos/MysteriumNetwork/node/deployments","created_at":"2017-01-26T00:43:08Z","updated_at":"2018-05-19T00:38:17Z","pushed_at":"2018-05-18T12:49:53Z","git_url":"git://github.com/MysteriumNetwork/node.git","ssh_url":"git@github.com:MysteriumNetwork/node.git","clone_url":"https://github.com/MysteriumNetwork/node.git","svn_url":"https://github.com/MysteriumNetwork/node","homepage":"https://mysterium.network/","size":3414,"stargazers_count":431,"watchers_count":431,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":63,"open_issues":20,"watchers":431,"default_branch":"master"}},"base":{"label":"MysteriumNetwork:master","ref":"master","sha":"94d79be039c4b60335ed581b32897deb0034cde9","user":{"login":"MysteriumNetwork","id":23056638,"avatar_url":"https://avatars3.githubusercontent.com/u/23056638?v=4","gravatar_id":"","url":"https://api.github.com/users/MysteriumNetwork","html_url":"https://github.com/MysteriumNetwork","followers_url":"https://api.github.com/users/MysteriumNetwork/followers","following_url":"https://api.github.com/users/MysteriumNetwork/following{/other_user}","gists_url":"https://api.github.com/users/MysteriumNetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/MysteriumNetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MysteriumNetwork/subscriptions","organizations_url":"https://api.github.com/users/MysteriumNetwork/orgs","repos_url":"https://api.github.com/users/MysteriumNetwork/repos","events_url":"https://api.github.com/users/MysteriumNetwork/events{/privacy}","received_events_url":"https://api.github.com/users/MysteriumNetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":80073079,"name":"node","full_name":"MysteriumNetwork/node","owner":{"login":"MysteriumNetwork","id":23056638,"avatar_url":"https://avatars3.githubusercontent.com/u/23056638?v=4","gravatar_id":"","url":"https://api.github.com/users/MysteriumNetwork","html_url":"https://github.com/MysteriumNetwork","followers_url":"https://api.github.com/users/MysteriumNetwork/followers","following_url":"https://api.github.com/users/MysteriumNetwork/following{/other_user}","gists_url":"https://api.github.com/users/MysteriumNetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/MysteriumNetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MysteriumNetwork/subscriptions","organizations_url":"https://api.github.com/users/MysteriumNetwork/orgs","repos_url":"https://api.github.com/users/MysteriumNetwork/repos","events_url":"https://api.github.com/users/MysteriumNetwork/events{/privacy}","received_events_url":"https://api.github.com/users/MysteriumNetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MysteriumNetwork/node","description":"Mysterium Node - VPN server and client for Mysterium Network","fork":false,"url":"https://api.github.com/repos/MysteriumNetwork/node","forks_url":"https://api.github.com/repos/MysteriumNetwork/node/forks","keys_url":"https://api.github.com/repos/MysteriumNetwork/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MysteriumNetwork/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MysteriumNetwork/node/teams","hooks_url":"https://api.github.com/repos/MysteriumNetwork/node/hooks","issue_events_url":"https://api.github.com/repos/MysteriumNetwork/node/issues/events{/number}","events_url":"https://api.github.com/repos/MysteriumNetwork/node/events","assignees_url":"https://api.github.com/repos/MysteriumNetwork/node/assignees{/user}","branches_url":"https://api.github.com/repos/MysteriumNetwork/node/branches{/branch}","tags_url":"https://api.github.com/repos/MysteriumNetwork/node/tags","blobs_url":"https://api.github.com/repos/MysteriumNetwork/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MysteriumNetwork/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MysteriumNetwork/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/MysteriumNetwork/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MysteriumNetwork/node/statuses/{sha}","languages_url":"https://api.github.com/repos/MysteriumNetwork/node/languages","stargazers_url":"https://api.github.com/repos/MysteriumNetwork/node/stargazers","contributors_url":"https://api.github.com/repos/MysteriumNetwork/node/contributors","subscribers_url":"https://api.github.com/repos/MysteriumNetwork/node/subscribers","subscription_url":"https://api.github.com/repos/MysteriumNetwork/node/subscription","commits_url":"https://api.github.com/repos/MysteriumNetwork/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/MysteriumNetwork/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/MysteriumNetwork/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/MysteriumNetwork/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/MysteriumNetwork/node/contents/{+path}","compare_url":"https://api.github.com/repos/MysteriumNetwork/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MysteriumNetwork/node/merges","archive_url":"https://api.github.com/repos/MysteriumNetwork/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MysteriumNetwork/node/downloads","issues_url":"https://api.github.com/repos/MysteriumNetwork/node/issues{/number}","pulls_url":"https://api.github.com/repos/MysteriumNetwork/node/pulls{/number}","milestones_url":"https://api.github.com/repos/MysteriumNetwork/node/milestones{/number}","notifications_url":"https://api.github.com/repos/MysteriumNetwork/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MysteriumNetwork/node/labels{/name}","releases_url":"https://api.github.com/repos/MysteriumNetwork/node/releases{/id}","deployments_url":"https://api.github.com/repos/MysteriumNetwork/node/deployments","created_at":"2017-01-26T00:43:08Z","updated_at":"2018-05-19T00:38:17Z","pushed_at":"2018-05-18T12:49:53Z","git_url":"git://github.com/MysteriumNetwork/node.git","ssh_url":"git@github.com:MysteriumNetwork/node.git","clone_url":"https://github.com/MysteriumNetwork/node.git","svn_url":"https://github.com/MysteriumNetwork/node","homepage":"https://mysterium.network/","size":3414,"stargazers_count":431,"watchers_count":431,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":63,"open_issues":20,"watchers":431,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MysteriumNetwork/node/pulls/248"},"html":{"href":"https://github.com/MysteriumNetwork/node/pull/248"},"issue":{"href":"https://api.github.com/repos/MysteriumNetwork/node/issues/248"},"comments":{"href":"https://api.github.com/repos/MysteriumNetwork/node/issues/248/comments"},"review_comments":{"href":"https://api.github.com/repos/MysteriumNetwork/node/pulls/248/comments"},"review_comment":{"href":"https://api.github.com/repos/MysteriumNetwork/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MysteriumNetwork/node/pulls/248/commits"},"statuses":{"href":"https://api.github.com/repos/MysteriumNetwork/node/statuses/60df77186ae76523ee7559afc81906667c387e57"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tadovas"}}