{"action":"created","comment":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/comments/33338075","id":33338075,"diff_hunk":"@@ -52,14 +52,14 @@ public function authorizeAction(Request $request)\n         $form = $this->container->get('fos_oauth_server.authorize.form');\n         $formHandler = $this->container->get('fos_oauth_server.authorize.form.handler');\n \n+        $scope = $request->query->get('scope', $request->request->get($form->getName().'[scope]', null, true));","path":"Controller/AuthorizeController.php","position":4,"original_position":4,"commit_id":"54fb9e524a36aa51e68f37b212f9721864890f81","original_commit_id":"54fb9e524a36aa51e68f37b212f9721864890f81","user":{"login":"Spomky","id":1091072,"avatar_url":"https://avatars.githubusercontent.com/u/1091072?v=3","gravatar_id":"","url":"https://api.github.com/users/Spomky","html_url":"https://github.com/Spomky","followers_url":"https://api.github.com/users/Spomky/followers","following_url":"https://api.github.com/users/Spomky/following{/other_user}","gists_url":"https://api.github.com/users/Spomky/gists{/gist_id}","starred_url":"https://api.github.com/users/Spomky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spomky/subscriptions","organizations_url":"https://api.github.com/users/Spomky/orgs","repos_url":"https://api.github.com/users/Spomky/repos","events_url":"https://api.github.com/users/Spomky/events{/privacy}","received_events_url":"https://api.github.com/users/Spomky/received_events","type":"User","site_admin":false},"body":"The way you get scope from the form should not be hardcoded: `$form->getName().'[scope]'`","created_at":"2015-06-26T08:41:13Z","updated_at":"2015-06-26T08:41:13Z","html_url":"https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/pull/332#discussion_r33338075","pull_request_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/332","_links":{"self":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/comments/33338075"},"html":{"href":"https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/pull/332#discussion_r33338075"},"pull_request":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/332"}}},"pull_request":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/332","id":38581453,"html_url":"https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/pull/332","diff_url":"https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/pull/332.diff","patch_url":"https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/pull/332.patch","issue_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/issues/332","number":332,"state":"open","locked":false,"title":"Pass OAuth scopes to the OAuthEvent","user":{"login":"vierbergenlars","id":1194648,"avatar_url":"https://avatars.githubusercontent.com/u/1194648?v=3","gravatar_id":"","url":"https://api.github.com/users/vierbergenlars","html_url":"https://github.com/vierbergenlars","followers_url":"https://api.github.com/users/vierbergenlars/followers","following_url":"https://api.github.com/users/vierbergenlars/following{/other_user}","gists_url":"https://api.github.com/users/vierbergenlars/gists{/gist_id}","starred_url":"https://api.github.com/users/vierbergenlars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vierbergenlars/subscriptions","organizations_url":"https://api.github.com/users/vierbergenlars/orgs","repos_url":"https://api.github.com/users/vierbergenlars/repos","events_url":"https://api.github.com/users/vierbergenlars/events{/privacy}","received_events_url":"https://api.github.com/users/vierbergenlars/received_events","type":"User","site_admin":false},"body":"An eventlistener on `pre/post_authorization_process` may be interested in the scopes the OAuth client requested. (For example to show the authorization page again when the scopes the app requests have changed since the last authorization)\r\n\r\nThis PR adds one extra optional parameter to `OAuthEvent`, and thus is fully backwards compatible with previous versions.","created_at":"2015-06-25T19:03:26Z","updated_at":"2015-06-26T08:41:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79721de20d6c3291f4b3e1ee334e800196383b4f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/332/commits","review_comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/332/comments","review_comment_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/issues/332/comments","statuses_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/statuses/54fb9e524a36aa51e68f37b212f9721864890f81","head":{"label":"vierbergenlars:oauth-event-scopes","ref":"oauth-event-scopes","sha":"54fb9e524a36aa51e68f37b212f9721864890f81","user":{"login":"vierbergenlars","id":1194648,"avatar_url":"https://avatars.githubusercontent.com/u/1194648?v=3","gravatar_id":"","url":"https://api.github.com/users/vierbergenlars","html_url":"https://github.com/vierbergenlars","followers_url":"https://api.github.com/users/vierbergenlars/followers","following_url":"https://api.github.com/users/vierbergenlars/following{/other_user}","gists_url":"https://api.github.com/users/vierbergenlars/gists{/gist_id}","starred_url":"https://api.github.com/users/vierbergenlars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vierbergenlars/subscriptions","organizations_url":"https://api.github.com/users/vierbergenlars/orgs","repos_url":"https://api.github.com/users/vierbergenlars/repos","events_url":"https://api.github.com/users/vierbergenlars/events{/privacy}","received_events_url":"https://api.github.com/users/vierbergenlars/received_events","type":"User","site_admin":false},"repo":{"id":38047807,"name":"FOSOAuthServerBundle","full_name":"vierbergenlars/FOSOAuthServerBundle","owner":{"login":"vierbergenlars","id":1194648,"avatar_url":"https://avatars.githubusercontent.com/u/1194648?v=3","gravatar_id":"","url":"https://api.github.com/users/vierbergenlars","html_url":"https://github.com/vierbergenlars","followers_url":"https://api.github.com/users/vierbergenlars/followers","following_url":"https://api.github.com/users/vierbergenlars/following{/other_user}","gists_url":"https://api.github.com/users/vierbergenlars/gists{/gist_id}","starred_url":"https://api.github.com/users/vierbergenlars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vierbergenlars/subscriptions","organizations_url":"https://api.github.com/users/vierbergenlars/orgs","repos_url":"https://api.github.com/users/vierbergenlars/repos","events_url":"https://api.github.com/users/vierbergenlars/events{/privacy}","received_events_url":"https://api.github.com/users/vierbergenlars/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vierbergenlars/FOSOAuthServerBundle","description":"A server side OAuth2 Bundle for Symfony2","fork":true,"url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle","forks_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/forks","keys_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/teams","hooks_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/hooks","issue_events_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/issues/events{/number}","events_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/events","assignees_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/assignees{/user}","branches_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/branches{/branch}","tags_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/tags","blobs_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/languages","stargazers_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/stargazers","contributors_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/contributors","subscribers_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/subscribers","subscription_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/subscription","commits_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/contents/{+path}","compare_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/merges","archive_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/downloads","issues_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/issues{/number}","pulls_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/labels{/name}","releases_url":"https://api.github.com/repos/vierbergenlars/FOSOAuthServerBundle/releases{/id}","created_at":"2015-06-25T12:24:52Z","updated_at":"2015-06-25T12:24:52Z","pushed_at":"2015-06-26T08:05:39Z","git_url":"git://github.com/vierbergenlars/FOSOAuthServerBundle.git","ssh_url":"git@github.com:vierbergenlars/FOSOAuthServerBundle.git","clone_url":"https://github.com/vierbergenlars/FOSOAuthServerBundle.git","svn_url":"https://github.com/vierbergenlars/FOSOAuthServerBundle","homepage":"","size":950,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"FriendsOfSymfony:master","ref":"master","sha":"0c72d8baf707dce59c59a4daa1549c06e510bbed","user":{"login":"FriendsOfSymfony","id":529709,"avatar_url":"https://avatars.githubusercontent.com/u/529709?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfSymfony","html_url":"https://github.com/FriendsOfSymfony","followers_url":"https://api.github.com/users/FriendsOfSymfony/followers","following_url":"https://api.github.com/users/FriendsOfSymfony/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfSymfony/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfSymfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfSymfony/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfSymfony/orgs","repos_url":"https://api.github.com/users/FriendsOfSymfony/repos","events_url":"https://api.github.com/users/FriendsOfSymfony/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfSymfony/received_events","type":"Organization","site_admin":false},"repo":{"id":2868510,"name":"FOSOAuthServerBundle","full_name":"FriendsOfSymfony/FOSOAuthServerBundle","owner":{"login":"FriendsOfSymfony","id":529709,"avatar_url":"https://avatars.githubusercontent.com/u/529709?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfSymfony","html_url":"https://github.com/FriendsOfSymfony","followers_url":"https://api.github.com/users/FriendsOfSymfony/followers","following_url":"https://api.github.com/users/FriendsOfSymfony/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfSymfony/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfSymfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfSymfony/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfSymfony/orgs","repos_url":"https://api.github.com/users/FriendsOfSymfony/repos","events_url":"https://api.github.com/users/FriendsOfSymfony/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfSymfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FriendsOfSymfony/FOSOAuthServerBundle","description":"A server side OAuth2 Bundle for Symfony2","fork":false,"url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle","forks_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/forks","keys_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/teams","hooks_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/hooks","issue_events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/issues/events{/number}","events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/events","assignees_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/assignees{/user}","branches_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/branches{/branch}","tags_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/tags","blobs_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/languages","stargazers_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/stargazers","contributors_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/contributors","subscribers_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/subscribers","subscription_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/subscription","commits_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/contents/{+path}","compare_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/merges","archive_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/downloads","issues_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/issues{/number}","pulls_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/labels{/name}","releases_url":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/releases{/id}","created_at":"2011-11-28T16:46:32Z","updated_at":"2015-06-16T12:08:26Z","pushed_at":"2015-06-26T02:53:13Z","git_url":"git://github.com/FriendsOfSymfony/FOSOAuthServerBundle.git","ssh_url":"git@github.com:FriendsOfSymfony/FOSOAuthServerBundle.git","clone_url":"https://github.com/FriendsOfSymfony/FOSOAuthServerBundle.git","svn_url":"https://github.com/FriendsOfSymfony/FOSOAuthServerBundle","homepage":"","size":950,"stargazers_count":452,"watchers_count":452,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":145,"mirror_url":null,"open_issues_count":81,"forks":145,"open_issues":81,"watchers":452,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/332"},"html":{"href":"https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/pull/332"},"issue":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/issues/332"},"comments":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/issues/332/comments"},"review_comments":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/332/comments"},"review_comment":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/pulls/332/commits"},"statuses":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/statuses/54fb9e524a36aa51e68f37b212f9721864890f81"}}}}