{"action":"created","comment":{"url":"https://api.github.com/repos/auth0/express-jwt/pulls/comments/40421838","id":40421838,"diff_hunk":"@@ -49,6 +49,12 @@ app.use(jwt({ secret: 'shhhhhhared-secret'}).unless({path: ['/token']}));\n \n This is especially useful when applying to multiple routes. In the example above, `path` can be a string, a regexp, or an array of any of those.\n \n+If you are using a base64 encoded secret, simply allocate a new buffer and specify 'base64' encoding (before using the secret) like the following.\n+\n+```javascript\n+var secret = new Buffer('shhhhhhared-secret', 'base64');","path":"README.md","position":7,"original_position":7,"commit_id":"e4cddfdc432b02d48bd61b627da7c927df79d6fc","original_commit_id":"e4cddfdc432b02d48bd61b627da7c927df79d6fc","user":{"login":"twistedstream","id":3535918,"avatar_url":"https://avatars.githubusercontent.com/u/3535918?v=3","gravatar_id":"","url":"https://api.github.com/users/twistedstream","html_url":"https://github.com/twistedstream","followers_url":"https://api.github.com/users/twistedstream/followers","following_url":"https://api.github.com/users/twistedstream/following{/other_user}","gists_url":"https://api.github.com/users/twistedstream/gists{/gist_id}","starred_url":"https://api.github.com/users/twistedstream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twistedstream/subscriptions","organizations_url":"https://api.github.com/users/twistedstream/orgs","repos_url":"https://api.github.com/users/twistedstream/repos","events_url":"https://api.github.com/users/twistedstream/events{/privacy}","received_events_url":"https://api.github.com/users/twistedstream/received_events","type":"User","site_admin":false},"body":"@jfromaniello: is simply using a `Buffer` class like this enough for Auth0 client secrets or should we also perform the URL-decoding? It seems to work with just Buffer for me but maybe I'm missing something.","created_at":"2015-09-25T11:51:39Z","updated_at":"2015-09-25T11:51:39Z","html_url":"https://github.com/auth0/express-jwt/pull/98#discussion_r40421838","pull_request_url":"https://api.github.com/repos/auth0/express-jwt/pulls/98","_links":{"self":{"href":"https://api.github.com/repos/auth0/express-jwt/pulls/comments/40421838"},"html":{"href":"https://github.com/auth0/express-jwt/pull/98#discussion_r40421838"},"pull_request":{"href":"https://api.github.com/repos/auth0/express-jwt/pulls/98"}}},"pull_request":{"url":"https://api.github.com/repos/auth0/express-jwt/pulls/98","id":45487322,"html_url":"https://github.com/auth0/express-jwt/pull/98","diff_url":"https://github.com/auth0/express-jwt/pull/98.diff","patch_url":"https://github.com/auth0/express-jwt/pull/98.patch","issue_url":"https://api.github.com/repos/auth0/express-jwt/issues/98","number":98,"state":"open","locked":false,"title":"Added documentation on how to set base64 encoding flag","user":{"login":"dchahla","id":2994164,"avatar_url":"https://avatars.githubusercontent.com/u/2994164?v=3","gravatar_id":"","url":"https://api.github.com/users/dchahla","html_url":"https://github.com/dchahla","followers_url":"https://api.github.com/users/dchahla/followers","following_url":"https://api.github.com/users/dchahla/following{/other_user}","gists_url":"https://api.github.com/users/dchahla/gists{/gist_id}","starred_url":"https://api.github.com/users/dchahla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchahla/subscriptions","organizations_url":"https://api.github.com/users/dchahla/orgs","repos_url":"https://api.github.com/users/dchahla/repos","events_url":"https://api.github.com/users/dchahla/events{/privacy}","received_events_url":"https://api.github.com/users/dchahla/received_events","type":"User","site_admin":false},"body":"Help on how to allocate a new buffer and specify 'base64' ","created_at":"2015-09-20T00:41:53Z","updated_at":"2015-09-25T11:51:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f900c38bbd51ccd76a6db275b34dcf78da02ab5e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/auth0/express-jwt/pulls/98/commits","review_comments_url":"https://api.github.com/repos/auth0/express-jwt/pulls/98/comments","review_comment_url":"https://api.github.com/repos/auth0/express-jwt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/auth0/express-jwt/issues/98/comments","statuses_url":"https://api.github.com/repos/auth0/express-jwt/statuses/e4cddfdc432b02d48bd61b627da7c927df79d6fc","head":{"label":"dchahla:master","ref":"master","sha":"e4cddfdc432b02d48bd61b627da7c927df79d6fc","user":{"login":"dchahla","id":2994164,"avatar_url":"https://avatars.githubusercontent.com/u/2994164?v=3","gravatar_id":"","url":"https://api.github.com/users/dchahla","html_url":"https://github.com/dchahla","followers_url":"https://api.github.com/users/dchahla/followers","following_url":"https://api.github.com/users/dchahla/following{/other_user}","gists_url":"https://api.github.com/users/dchahla/gists{/gist_id}","starred_url":"https://api.github.com/users/dchahla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchahla/subscriptions","organizations_url":"https://api.github.com/users/dchahla/orgs","repos_url":"https://api.github.com/users/dchahla/repos","events_url":"https://api.github.com/users/dchahla/events{/privacy}","received_events_url":"https://api.github.com/users/dchahla/received_events","type":"User","site_admin":false},"repo":{"id":42794744,"name":"express-jwt","full_name":"dchahla/express-jwt","owner":{"login":"dchahla","id":2994164,"avatar_url":"https://avatars.githubusercontent.com/u/2994164?v=3","gravatar_id":"","url":"https://api.github.com/users/dchahla","html_url":"https://github.com/dchahla","followers_url":"https://api.github.com/users/dchahla/followers","following_url":"https://api.github.com/users/dchahla/following{/other_user}","gists_url":"https://api.github.com/users/dchahla/gists{/gist_id}","starred_url":"https://api.github.com/users/dchahla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchahla/subscriptions","organizations_url":"https://api.github.com/users/dchahla/orgs","repos_url":"https://api.github.com/users/dchahla/repos","events_url":"https://api.github.com/users/dchahla/events{/privacy}","received_events_url":"https://api.github.com/users/dchahla/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dchahla/express-jwt","description":"connect/express middleware that validates a JsonWebToken (JWT) and set the req.user with the attributes","fork":true,"url":"https://api.github.com/repos/dchahla/express-jwt","forks_url":"https://api.github.com/repos/dchahla/express-jwt/forks","keys_url":"https://api.github.com/repos/dchahla/express-jwt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dchahla/express-jwt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dchahla/express-jwt/teams","hooks_url":"https://api.github.com/repos/dchahla/express-jwt/hooks","issue_events_url":"https://api.github.com/repos/dchahla/express-jwt/issues/events{/number}","events_url":"https://api.github.com/repos/dchahla/express-jwt/events","assignees_url":"https://api.github.com/repos/dchahla/express-jwt/assignees{/user}","branches_url":"https://api.github.com/repos/dchahla/express-jwt/branches{/branch}","tags_url":"https://api.github.com/repos/dchahla/express-jwt/tags","blobs_url":"https://api.github.com/repos/dchahla/express-jwt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dchahla/express-jwt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dchahla/express-jwt/git/refs{/sha}","trees_url":"https://api.github.com/repos/dchahla/express-jwt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dchahla/express-jwt/statuses/{sha}","languages_url":"https://api.github.com/repos/dchahla/express-jwt/languages","stargazers_url":"https://api.github.com/repos/dchahla/express-jwt/stargazers","contributors_url":"https://api.github.com/repos/dchahla/express-jwt/contributors","subscribers_url":"https://api.github.com/repos/dchahla/express-jwt/subscribers","subscription_url":"https://api.github.com/repos/dchahla/express-jwt/subscription","commits_url":"https://api.github.com/repos/dchahla/express-jwt/commits{/sha}","git_commits_url":"https://api.github.com/repos/dchahla/express-jwt/git/commits{/sha}","comments_url":"https://api.github.com/repos/dchahla/express-jwt/comments{/number}","issue_comment_url":"https://api.github.com/repos/dchahla/express-jwt/issues/comments{/number}","contents_url":"https://api.github.com/repos/dchahla/express-jwt/contents/{+path}","compare_url":"https://api.github.com/repos/dchahla/express-jwt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dchahla/express-jwt/merges","archive_url":"https://api.github.com/repos/dchahla/express-jwt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dchahla/express-jwt/downloads","issues_url":"https://api.github.com/repos/dchahla/express-jwt/issues{/number}","pulls_url":"https://api.github.com/repos/dchahla/express-jwt/pulls{/number}","milestones_url":"https://api.github.com/repos/dchahla/express-jwt/milestones{/number}","notifications_url":"https://api.github.com/repos/dchahla/express-jwt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dchahla/express-jwt/labels{/name}","releases_url":"https://api.github.com/repos/dchahla/express-jwt/releases{/id}","created_at":"2015-09-20T00:36:05Z","updated_at":"2015-09-20T00:36:06Z","pushed_at":"2015-09-20T00:40:23Z","git_url":"git://github.com/dchahla/express-jwt.git","ssh_url":"git@github.com:dchahla/express-jwt.git","clone_url":"https://github.com/dchahla/express-jwt.git","svn_url":"https://github.com/dchahla/express-jwt","homepage":null,"size":161,"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":"auth0:master","ref":"master","sha":"e5d14cec8611465ec82869aa16a10783c0c86c92","user":{"login":"auth0","id":2824157,"avatar_url":"https://avatars.githubusercontent.com/u/2824157?v=3","gravatar_id":"","url":"https://api.github.com/users/auth0","html_url":"https://github.com/auth0","followers_url":"https://api.github.com/users/auth0/followers","following_url":"https://api.github.com/users/auth0/following{/other_user}","gists_url":"https://api.github.com/users/auth0/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0/subscriptions","organizations_url":"https://api.github.com/users/auth0/orgs","repos_url":"https://api.github.com/users/auth0/repos","events_url":"https://api.github.com/users/auth0/events{/privacy}","received_events_url":"https://api.github.com/users/auth0/received_events","type":"Organization","site_admin":false},"repo":{"id":13783958,"name":"express-jwt","full_name":"auth0/express-jwt","owner":{"login":"auth0","id":2824157,"avatar_url":"https://avatars.githubusercontent.com/u/2824157?v=3","gravatar_id":"","url":"https://api.github.com/users/auth0","html_url":"https://github.com/auth0","followers_url":"https://api.github.com/users/auth0/followers","following_url":"https://api.github.com/users/auth0/following{/other_user}","gists_url":"https://api.github.com/users/auth0/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0/subscriptions","organizations_url":"https://api.github.com/users/auth0/orgs","repos_url":"https://api.github.com/users/auth0/repos","events_url":"https://api.github.com/users/auth0/events{/privacy}","received_events_url":"https://api.github.com/users/auth0/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/auth0/express-jwt","description":"connect/express middleware that validates a JsonWebToken (JWT) and set the req.user with the attributes","fork":false,"url":"https://api.github.com/repos/auth0/express-jwt","forks_url":"https://api.github.com/repos/auth0/express-jwt/forks","keys_url":"https://api.github.com/repos/auth0/express-jwt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/auth0/express-jwt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/auth0/express-jwt/teams","hooks_url":"https://api.github.com/repos/auth0/express-jwt/hooks","issue_events_url":"https://api.github.com/repos/auth0/express-jwt/issues/events{/number}","events_url":"https://api.github.com/repos/auth0/express-jwt/events","assignees_url":"https://api.github.com/repos/auth0/express-jwt/assignees{/user}","branches_url":"https://api.github.com/repos/auth0/express-jwt/branches{/branch}","tags_url":"https://api.github.com/repos/auth0/express-jwt/tags","blobs_url":"https://api.github.com/repos/auth0/express-jwt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/auth0/express-jwt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/auth0/express-jwt/git/refs{/sha}","trees_url":"https://api.github.com/repos/auth0/express-jwt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/auth0/express-jwt/statuses/{sha}","languages_url":"https://api.github.com/repos/auth0/express-jwt/languages","stargazers_url":"https://api.github.com/repos/auth0/express-jwt/stargazers","contributors_url":"https://api.github.com/repos/auth0/express-jwt/contributors","subscribers_url":"https://api.github.com/repos/auth0/express-jwt/subscribers","subscription_url":"https://api.github.com/repos/auth0/express-jwt/subscription","commits_url":"https://api.github.com/repos/auth0/express-jwt/commits{/sha}","git_commits_url":"https://api.github.com/repos/auth0/express-jwt/git/commits{/sha}","comments_url":"https://api.github.com/repos/auth0/express-jwt/comments{/number}","issue_comment_url":"https://api.github.com/repos/auth0/express-jwt/issues/comments{/number}","contents_url":"https://api.github.com/repos/auth0/express-jwt/contents/{+path}","compare_url":"https://api.github.com/repos/auth0/express-jwt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/auth0/express-jwt/merges","archive_url":"https://api.github.com/repos/auth0/express-jwt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/auth0/express-jwt/downloads","issues_url":"https://api.github.com/repos/auth0/express-jwt/issues{/number}","pulls_url":"https://api.github.com/repos/auth0/express-jwt/pulls{/number}","milestones_url":"https://api.github.com/repos/auth0/express-jwt/milestones{/number}","notifications_url":"https://api.github.com/repos/auth0/express-jwt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/auth0/express-jwt/labels{/name}","releases_url":"https://api.github.com/repos/auth0/express-jwt/releases{/id}","created_at":"2013-10-22T19:45:55Z","updated_at":"2015-09-24T21:34:44Z","pushed_at":"2015-09-20T00:41:53Z","git_url":"git://github.com/auth0/express-jwt.git","ssh_url":"git@github.com:auth0/express-jwt.git","clone_url":"https://github.com/auth0/express-jwt.git","svn_url":"https://github.com/auth0/express-jwt","homepage":null,"size":700,"stargazers_count":495,"watchers_count":495,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":95,"mirror_url":null,"open_issues_count":23,"forks":95,"open_issues":23,"watchers":495,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/auth0/express-jwt/pulls/98"},"html":{"href":"https://github.com/auth0/express-jwt/pull/98"},"issue":{"href":"https://api.github.com/repos/auth0/express-jwt/issues/98"},"comments":{"href":"https://api.github.com/repos/auth0/express-jwt/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/auth0/express-jwt/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/auth0/express-jwt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/auth0/express-jwt/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/auth0/express-jwt/statuses/e4cddfdc432b02d48bd61b627da7c927df79d6fc"}}}}