{"action":"closed","number":567,"pull_request":{"url":"https://api.github.com/repos/bshaffer/oauth2-server-php/pulls/567","id":33810817,"html_url":"https://github.com/bshaffer/oauth2-server-php/pull/567","diff_url":"https://github.com/bshaffer/oauth2-server-php/pull/567.diff","patch_url":"https://github.com/bshaffer/oauth2-server-php/pull/567.patch","issue_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/issues/567","number":567,"state":"closed","locked":false,"title":"Updated JWT lib to address #564","user":{"login":"phindmarsh","id":344000,"avatar_url":"https://avatars.githubusercontent.com/u/344000?v=3","gravatar_id":"","url":"https://api.github.com/users/phindmarsh","html_url":"https://github.com/phindmarsh","followers_url":"https://api.github.com/users/phindmarsh/followers","following_url":"https://api.github.com/users/phindmarsh/following{/other_user}","gists_url":"https://api.github.com/users/phindmarsh/gists{/gist_id}","starred_url":"https://api.github.com/users/phindmarsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phindmarsh/subscriptions","organizations_url":"https://api.github.com/users/phindmarsh/orgs","repos_url":"https://api.github.com/users/phindmarsh/repos","events_url":"https://api.github.com/users/phindmarsh/events{/privacy}","received_events_url":"https://api.github.com/users/phindmarsh/received_events","type":"User","site_admin":false},"body":"`JWT::decode()` now takes an array of `$allowed_algorithms` to prevent tricking the server into decoding using a different algorithm than intended.\r\n\r\nThe only required change here is specifying the `$allowed_algorithms` parameter to the `JWT::decode()` method and updating calls to that function elsewhere.\r\n\r\nHowever since the JWT Grant Type doesn't store the RSA algorithm alongside the public key (and it looked like a bit of work to do that), I've extended the JWT class to provide supported RSA methods using `JWT::getSupportedMethods($type)` and refactored the `JWT::sign()` and `JWT::verifySignature()` methods to use the `JWT::$supportedMethods` declaration. \r\n\r\nThis sounds like a big change, but its essentially a copy of the `firebase/php-jwt` implementation and it just seemed cleaner to do it this way. If you would rather we sticked to what was there and only change the `JWT::decode()` method signature, we'll just need to hard-code the allowed RSA methods in `JWTBearer::validateRequest()`. I figured doing that would be non-obvious for future maintenance but happy to follow your lead on whatever you feel comfortable with.","created_at":"2015-04-21T22:40:17Z","updated_at":"2015-04-23T22:11:24Z","closed_at":"2015-04-23T22:11:24Z","merged_at":null,"merge_commit_sha":"ef07eb40dbc08007fb85992738a6409269b378fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/pulls/567/commits","review_comments_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/pulls/567/comments","review_comment_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/issues/567/comments","statuses_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/statuses/ad744d8f0143f468223556e491fb8a90aba05505","head":{"label":"phindmarsh:jwt-patch","ref":"jwt-patch","sha":"ad744d8f0143f468223556e491fb8a90aba05505","user":{"login":"phindmarsh","id":344000,"avatar_url":"https://avatars.githubusercontent.com/u/344000?v=3","gravatar_id":"","url":"https://api.github.com/users/phindmarsh","html_url":"https://github.com/phindmarsh","followers_url":"https://api.github.com/users/phindmarsh/followers","following_url":"https://api.github.com/users/phindmarsh/following{/other_user}","gists_url":"https://api.github.com/users/phindmarsh/gists{/gist_id}","starred_url":"https://api.github.com/users/phindmarsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phindmarsh/subscriptions","organizations_url":"https://api.github.com/users/phindmarsh/orgs","repos_url":"https://api.github.com/users/phindmarsh/repos","events_url":"https://api.github.com/users/phindmarsh/events{/privacy}","received_events_url":"https://api.github.com/users/phindmarsh/received_events","type":"User","site_admin":false},"repo":{"id":18024706,"name":"oauth2-server-php","full_name":"phindmarsh/oauth2-server-php","owner":{"login":"phindmarsh","id":344000,"avatar_url":"https://avatars.githubusercontent.com/u/344000?v=3","gravatar_id":"","url":"https://api.github.com/users/phindmarsh","html_url":"https://github.com/phindmarsh","followers_url":"https://api.github.com/users/phindmarsh/followers","following_url":"https://api.github.com/users/phindmarsh/following{/other_user}","gists_url":"https://api.github.com/users/phindmarsh/gists{/gist_id}","starred_url":"https://api.github.com/users/phindmarsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phindmarsh/subscriptions","organizations_url":"https://api.github.com/users/phindmarsh/orgs","repos_url":"https://api.github.com/users/phindmarsh/repos","events_url":"https://api.github.com/users/phindmarsh/events{/privacy}","received_events_url":"https://api.github.com/users/phindmarsh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phindmarsh/oauth2-server-php","description":"A library for implementing an OAuth2 Server in php","fork":true,"url":"https://api.github.com/repos/phindmarsh/oauth2-server-php","forks_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/forks","keys_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/teams","hooks_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/hooks","issue_events_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/issues/events{/number}","events_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/events","assignees_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/assignees{/user}","branches_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/branches{/branch}","tags_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/tags","blobs_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/statuses/{sha}","languages_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/languages","stargazers_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/stargazers","contributors_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/contributors","subscribers_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/subscribers","subscription_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/subscription","commits_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/contents/{+path}","compare_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/merges","archive_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/downloads","issues_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/issues{/number}","pulls_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/pulls{/number}","milestones_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/milestones{/number}","notifications_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/labels{/name}","releases_url":"https://api.github.com/repos/phindmarsh/oauth2-server-php/releases{/id}","created_at":"2014-03-23T02:16:42Z","updated_at":"2015-04-21T21:19:01Z","pushed_at":"2015-04-23T20:10:17Z","git_url":"git://github.com/phindmarsh/oauth2-server-php.git","ssh_url":"git@github.com:phindmarsh/oauth2-server-php.git","clone_url":"https://github.com/phindmarsh/oauth2-server-php.git","svn_url":"https://github.com/phindmarsh/oauth2-server-php","homepage":null,"size":1528,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"develop"}},"base":{"label":"bshaffer:develop","ref":"develop","sha":"51b89152c8070e3bbfec424d99070882d9633725","user":{"login":"bshaffer","id":103941,"avatar_url":"https://avatars.githubusercontent.com/u/103941?v=3","gravatar_id":"","url":"https://api.github.com/users/bshaffer","html_url":"https://github.com/bshaffer","followers_url":"https://api.github.com/users/bshaffer/followers","following_url":"https://api.github.com/users/bshaffer/following{/other_user}","gists_url":"https://api.github.com/users/bshaffer/gists{/gist_id}","starred_url":"https://api.github.com/users/bshaffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bshaffer/subscriptions","organizations_url":"https://api.github.com/users/bshaffer/orgs","repos_url":"https://api.github.com/users/bshaffer/repos","events_url":"https://api.github.com/users/bshaffer/events{/privacy}","received_events_url":"https://api.github.com/users/bshaffer/received_events","type":"User","site_admin":false},"repo":{"id":5893828,"name":"oauth2-server-php","full_name":"bshaffer/oauth2-server-php","owner":{"login":"bshaffer","id":103941,"avatar_url":"https://avatars.githubusercontent.com/u/103941?v=3","gravatar_id":"","url":"https://api.github.com/users/bshaffer","html_url":"https://github.com/bshaffer","followers_url":"https://api.github.com/users/bshaffer/followers","following_url":"https://api.github.com/users/bshaffer/following{/other_user}","gists_url":"https://api.github.com/users/bshaffer/gists{/gist_id}","starred_url":"https://api.github.com/users/bshaffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bshaffer/subscriptions","organizations_url":"https://api.github.com/users/bshaffer/orgs","repos_url":"https://api.github.com/users/bshaffer/repos","events_url":"https://api.github.com/users/bshaffer/events{/privacy}","received_events_url":"https://api.github.com/users/bshaffer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bshaffer/oauth2-server-php","description":"A library for implementing an OAuth2 Server in php","fork":false,"url":"https://api.github.com/repos/bshaffer/oauth2-server-php","forks_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/forks","keys_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/teams","hooks_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/hooks","issue_events_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/issues/events{/number}","events_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/events","assignees_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/assignees{/user}","branches_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/branches{/branch}","tags_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/tags","blobs_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/statuses/{sha}","languages_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/languages","stargazers_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/stargazers","contributors_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/contributors","subscribers_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/subscribers","subscription_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/subscription","commits_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/contents/{+path}","compare_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/merges","archive_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/downloads","issues_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/issues{/number}","pulls_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/pulls{/number}","milestones_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/milestones{/number}","notifications_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/labels{/name}","releases_url":"https://api.github.com/repos/bshaffer/oauth2-server-php/releases{/id}","created_at":"2012-09-20T22:22:53Z","updated_at":"2015-04-23T21:58:23Z","pushed_at":"2015-04-23T21:58:22Z","git_url":"git://github.com/bshaffer/oauth2-server-php.git","ssh_url":"git@github.com:bshaffer/oauth2-server-php.git","clone_url":"https://github.com/bshaffer/oauth2-server-php.git","svn_url":"https://github.com/bshaffer/oauth2-server-php","homepage":"http://bshaffer.github.io/oauth2-server-php-docs","size":4322,"stargazers_count":1176,"watchers_count":1176,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":376,"mirror_url":null,"open_issues_count":83,"forks":376,"open_issues":83,"watchers":1176,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/bshaffer/oauth2-server-php/pulls/567"},"html":{"href":"https://github.com/bshaffer/oauth2-server-php/pull/567"},"issue":{"href":"https://api.github.com/repos/bshaffer/oauth2-server-php/issues/567"},"comments":{"href":"https://api.github.com/repos/bshaffer/oauth2-server-php/issues/567/comments"},"review_comments":{"href":"https://api.github.com/repos/bshaffer/oauth2-server-php/pulls/567/comments"},"review_comment":{"href":"https://api.github.com/repos/bshaffer/oauth2-server-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bshaffer/oauth2-server-php/pulls/567/commits"},"statuses":{"href":"https://api.github.com/repos/bshaffer/oauth2-server-php/statuses/ad744d8f0143f468223556e491fb8a90aba05505"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":7,"review_comments":6,"commits":1,"additions":86,"deletions":37,"changed_files":5}}