{"action":"created","comment":{"url":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/comments/80346964","id":80346964,"diff_hunk":"@@ -365,7 +379,16 @@ module.exports = function (classes) {\n         }\n \n         this.authHandler = handler;\n+      },\n+      enableJWTAuth: function (handler) {\n+        /*if (!_.isFunction(handler)) {","path":"src/server.js","position":54,"original_position":54,"commit_id":"46ff03342ab703cc4cddf21e26ea12389d3d2ac9","original_commit_id":"46ff03342ab703cc4cddf21e26ea12389d3d2ac9","user":{"login":"danielmihai","id":1886723,"avatar_url":"https://avatars.githubusercontent.com/u/1886723?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmihai","html_url":"https://github.com/danielmihai","followers_url":"https://api.github.com/users/danielmihai/followers","following_url":"https://api.github.com/users/danielmihai/following{/other_user}","gists_url":"https://api.github.com/users/danielmihai/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmihai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmihai/subscriptions","organizations_url":"https://api.github.com/users/danielmihai/orgs","repos_url":"https://api.github.com/users/danielmihai/repos","events_url":"https://api.github.com/users/danielmihai/events{/privacy}","received_events_url":"https://api.github.com/users/danielmihai/received_events","type":"User","site_admin":false},"body":"if the handler is not a function, we should throw an exception on setting up the authorization handler, so the server does not boot up with some jibberish handler such as a string.","created_at":"2016-09-24T00:17:59Z","updated_at":"2016-09-24T00:19:45Z","html_url":"https://github.com/pocesar/node-jsonrpc2/pull/25#discussion_r80346964","pull_request_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/comments/80346964"},"html":{"href":"https://github.com/pocesar/node-jsonrpc2/pull/25#discussion_r80346964"},"pull_request":{"href":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/25","id":85403255,"html_url":"https://github.com/pocesar/node-jsonrpc2/pull/25","diff_url":"https://github.com/pocesar/node-jsonrpc2/pull/25.diff","patch_url":"https://github.com/pocesar/node-jsonrpc2/pull/25.patch","issue_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/issues/25","number":25,"state":"open","locked":false,"title":"add JWT token support to client and server","user":{"login":"nfstry","id":3796513,"avatar_url":"https://avatars.githubusercontent.com/u/3796513?v=3","gravatar_id":"","url":"https://api.github.com/users/nfstry","html_url":"https://github.com/nfstry","followers_url":"https://api.github.com/users/nfstry/followers","following_url":"https://api.github.com/users/nfstry/following{/other_user}","gists_url":"https://api.github.com/users/nfstry/gists{/gist_id}","starred_url":"https://api.github.com/users/nfstry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfstry/subscriptions","organizations_url":"https://api.github.com/users/nfstry/orgs","repos_url":"https://api.github.com/users/nfstry/repos","events_url":"https://api.github.com/users/nfstry/events{/privacy}","received_events_url":"https://api.github.com/users/nfstry/received_events","type":"User","site_admin":false},"body":"i need the websocket client to include a token for jwt authentication so thought about adding it","created_at":"2016-09-15T13:26:29Z","updated_at":"2016-09-24T00:19:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99a4b020ccbbbba6e5a39a3364d88375775191f9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/25/commits","review_comments_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/25/comments","review_comment_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/issues/25/comments","statuses_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/statuses/46ff03342ab703cc4cddf21e26ea12389d3d2ac9","head":{"label":"nfstry:master","ref":"master","sha":"46ff03342ab703cc4cddf21e26ea12389d3d2ac9","user":{"login":"nfstry","id":3796513,"avatar_url":"https://avatars.githubusercontent.com/u/3796513?v=3","gravatar_id":"","url":"https://api.github.com/users/nfstry","html_url":"https://github.com/nfstry","followers_url":"https://api.github.com/users/nfstry/followers","following_url":"https://api.github.com/users/nfstry/following{/other_user}","gists_url":"https://api.github.com/users/nfstry/gists{/gist_id}","starred_url":"https://api.github.com/users/nfstry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfstry/subscriptions","organizations_url":"https://api.github.com/users/nfstry/orgs","repos_url":"https://api.github.com/users/nfstry/repos","events_url":"https://api.github.com/users/nfstry/events{/privacy}","received_events_url":"https://api.github.com/users/nfstry/received_events","type":"User","site_admin":false},"repo":{"id":68288639,"name":"node-jsonrpc2","full_name":"nfstry/node-jsonrpc2","owner":{"login":"nfstry","id":3796513,"avatar_url":"https://avatars.githubusercontent.com/u/3796513?v=3","gravatar_id":"","url":"https://api.github.com/users/nfstry","html_url":"https://github.com/nfstry","followers_url":"https://api.github.com/users/nfstry/followers","following_url":"https://api.github.com/users/nfstry/following{/other_user}","gists_url":"https://api.github.com/users/nfstry/gists{/gist_id}","starred_url":"https://api.github.com/users/nfstry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfstry/subscriptions","organizations_url":"https://api.github.com/users/nfstry/orgs","repos_url":"https://api.github.com/users/nfstry/repos","events_url":"https://api.github.com/users/nfstry/events{/privacy}","received_events_url":"https://api.github.com/users/nfstry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nfstry/node-jsonrpc2","description":"JSON-RPC 2.0 server and client library, with HTTP (with Websocket support) and TCP endpoints","fork":true,"url":"https://api.github.com/repos/nfstry/node-jsonrpc2","forks_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/forks","keys_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/teams","hooks_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/hooks","issue_events_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/issues/events{/number}","events_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/events","assignees_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/assignees{/user}","branches_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/branches{/branch}","tags_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/tags","blobs_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/git/refs{/sha}","trees_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/statuses/{sha}","languages_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/languages","stargazers_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/stargazers","contributors_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/contributors","subscribers_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/subscribers","subscription_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/subscription","commits_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/commits{/sha}","git_commits_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/git/commits{/sha}","comments_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/comments{/number}","issue_comment_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/issues/comments{/number}","contents_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/contents/{+path}","compare_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/merges","archive_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/downloads","issues_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/issues{/number}","pulls_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/pulls{/number}","milestones_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/milestones{/number}","notifications_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/labels{/name}","releases_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/releases{/id}","deployments_url":"https://api.github.com/repos/nfstry/node-jsonrpc2/deployments","created_at":"2016-09-15T11:35:33Z","updated_at":"2016-09-15T11:35:34Z","pushed_at":"2016-09-15T13:04:35Z","git_url":"git://github.com/nfstry/node-jsonrpc2.git","ssh_url":"git@github.com:nfstry/node-jsonrpc2.git","clone_url":"https://github.com/nfstry/node-jsonrpc2.git","svn_url":"https://github.com/nfstry/node-jsonrpc2","homepage":"","size":141,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"pocesar:master","ref":"master","sha":"4c0d49021728d2c32fa07ae4cde8f0fe8ccb044f","user":{"login":"pocesar","id":461084,"avatar_url":"https://avatars.githubusercontent.com/u/461084?v=3","gravatar_id":"","url":"https://api.github.com/users/pocesar","html_url":"https://github.com/pocesar","followers_url":"https://api.github.com/users/pocesar/followers","following_url":"https://api.github.com/users/pocesar/following{/other_user}","gists_url":"https://api.github.com/users/pocesar/gists{/gist_id}","starred_url":"https://api.github.com/users/pocesar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pocesar/subscriptions","organizations_url":"https://api.github.com/users/pocesar/orgs","repos_url":"https://api.github.com/users/pocesar/repos","events_url":"https://api.github.com/users/pocesar/events{/privacy}","received_events_url":"https://api.github.com/users/pocesar/received_events","type":"User","site_admin":false},"repo":{"id":11519794,"name":"node-jsonrpc2","full_name":"pocesar/node-jsonrpc2","owner":{"login":"pocesar","id":461084,"avatar_url":"https://avatars.githubusercontent.com/u/461084?v=3","gravatar_id":"","url":"https://api.github.com/users/pocesar","html_url":"https://github.com/pocesar","followers_url":"https://api.github.com/users/pocesar/followers","following_url":"https://api.github.com/users/pocesar/following{/other_user}","gists_url":"https://api.github.com/users/pocesar/gists{/gist_id}","starred_url":"https://api.github.com/users/pocesar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pocesar/subscriptions","organizations_url":"https://api.github.com/users/pocesar/orgs","repos_url":"https://api.github.com/users/pocesar/repos","events_url":"https://api.github.com/users/pocesar/events{/privacy}","received_events_url":"https://api.github.com/users/pocesar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pocesar/node-jsonrpc2","description":"JSON-RPC 2.0 server and client library, with HTTP (with Websocket support) and TCP endpoints","fork":true,"url":"https://api.github.com/repos/pocesar/node-jsonrpc2","forks_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/forks","keys_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/teams","hooks_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/hooks","issue_events_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/issues/events{/number}","events_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/events","assignees_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/assignees{/user}","branches_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/branches{/branch}","tags_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/tags","blobs_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/git/refs{/sha}","trees_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/statuses/{sha}","languages_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/languages","stargazers_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/stargazers","contributors_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/contributors","subscribers_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/subscribers","subscription_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/subscription","commits_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/commits{/sha}","git_commits_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/git/commits{/sha}","comments_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/comments{/number}","issue_comment_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/issues/comments{/number}","contents_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/contents/{+path}","compare_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/merges","archive_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/downloads","issues_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/issues{/number}","pulls_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls{/number}","milestones_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/milestones{/number}","notifications_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/labels{/name}","releases_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/releases{/id}","deployments_url":"https://api.github.com/repos/pocesar/node-jsonrpc2/deployments","created_at":"2013-07-19T04:03:58Z","updated_at":"2016-09-21T02:25:55Z","pushed_at":"2016-09-15T13:26:29Z","git_url":"git://github.com/pocesar/node-jsonrpc2.git","ssh_url":"git@github.com:pocesar/node-jsonrpc2.git","clone_url":"https://github.com/pocesar/node-jsonrpc2.git","svn_url":"https://github.com/pocesar/node-jsonrpc2","homepage":"","size":454,"stargazers_count":37,"watchers_count":37,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":9,"forks":24,"open_issues":9,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/25"},"html":{"href":"https://github.com/pocesar/node-jsonrpc2/pull/25"},"issue":{"href":"https://api.github.com/repos/pocesar/node-jsonrpc2/issues/25"},"comments":{"href":"https://api.github.com/repos/pocesar/node-jsonrpc2/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pocesar/node-jsonrpc2/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/pocesar/node-jsonrpc2/statuses/46ff03342ab703cc4cddf21e26ea12389d3d2ac9"}}}}
{"actor":{"display_login":"danielmihai"}}