{"action":"created","comment":{"url":"https://api.github.com/repos/ridibooks/intranet/pulls/comments/99530865","pull_request_review_id":20209082,"id":99530865,"diff_hunk":"@@ -0,0 +1,54 @@\n+<?php\n+\n+namespace Intra\\Controller;\n+\n+use Intra\\Lib\\Azure\\AuthorizationHelperForAADGraphService;\n+use Intra\\Lib\\Azure\\GraphServiceAccessHelper;\n+use Intra\\Service\\User\\UserSession;\n+use Silex\\Api\\ControllerProviderInterface;\n+use Silex\\Application;\n+use Symfony\\Component\\HttpFoundation\\RedirectResponse;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+\n+class UserSessionController implements ControllerProviderInterface\n+{\n+    public function connect(Application $app)\n+    {\n+        $controller_collection = $app['controllers_factory'];\n+        $controller_collection->get('/login.azure', [$this, 'loginAzure']);\n+        $controller_collection->get('/login', [$this, 'login']);\n+        $controller_collection->get('/logout', [$this, 'logout']);\n+        return $controller_collection;\n+    }\n+\n+    public function loginAzure(Request $request, Application $app)\n+    {\n+        $azure_login_token_array = AuthorizationHelperForAADGraphService::getAuthenticationHeaderFor3LeggedFlow($_GET['code']);","path":"src/Intra/Controller/UserSessionController.php","position":26,"original_position":26,"commit_id":"d5cd669c1c884e7912cd7d80c9ddb562aeb21b2c","original_commit_id":"d5cd669c1c884e7912cd7d80c9ddb562aeb21b2c","user":{"login":"namenu","id":243097,"avatar_url":"https://avatars.githubusercontent.com/u/243097?v=3","gravatar_id":"","url":"https://api.github.com/users/namenu","html_url":"https://github.com/namenu","followers_url":"https://api.github.com/users/namenu/followers","following_url":"https://api.github.com/users/namenu/following{/other_user}","gists_url":"https://api.github.com/users/namenu/gists{/gist_id}","starred_url":"https://api.github.com/users/namenu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namenu/subscriptions","organizations_url":"https://api.github.com/users/namenu/orgs","repos_url":"https://api.github.com/users/namenu/repos","events_url":"https://api.github.com/users/namenu/events{/privacy}","received_events_url":"https://api.github.com/users/namenu/received_events","type":"User","site_admin":false},"body":"Another superglobal here","created_at":"2017-02-06T07:53:51Z","updated_at":"2017-02-06T07:59:41Z","html_url":"https://github.com/ridibooks/intranet/pull/18#discussion_r99530865","pull_request_url":"https://api.github.com/repos/ridibooks/intranet/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/ridibooks/intranet/pulls/comments/99530865"},"html":{"href":"https://github.com/ridibooks/intranet/pull/18#discussion_r99530865"},"pull_request":{"href":"https://api.github.com/repos/ridibooks/intranet/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/ridibooks/intranet/pulls/18","id":104743741,"html_url":"https://github.com/ridibooks/intranet/pull/18","diff_url":"https://github.com/ridibooks/intranet/pull/18.diff","patch_url":"https://github.com/ridibooks/intranet/pull/18.patch","issue_url":"https://api.github.com/repos/ridibooks/intranet/issues/18","number":18,"state":"open","locked":false,"title":"Remove old controller","user":{"login":"imkitae","id":15985231,"avatar_url":"https://avatars.githubusercontent.com/u/15985231?v=3","gravatar_id":"","url":"https://api.github.com/users/imkitae","html_url":"https://github.com/imkitae","followers_url":"https://api.github.com/users/imkitae/followers","following_url":"https://api.github.com/users/imkitae/following{/other_user}","gists_url":"https://api.github.com/users/imkitae/gists{/gist_id}","starred_url":"https://api.github.com/users/imkitae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imkitae/subscriptions","organizations_url":"https://api.github.com/users/imkitae/orgs","repos_url":"https://api.github.com/users/imkitae/repos","events_url":"https://api.github.com/users/imkitae/events{/privacy}","received_events_url":"https://api.github.com/users/imkitae/received_events","type":"User","site_admin":false},"body":"There are two kinds of url controller. It's so confused when debugs or watches codes cause of not unified styles. so I removed old one and unified it to new one.\r\nAlso, I converted uppercase urls in form of lowercases.","created_at":"2017-02-06T06:47:22Z","updated_at":"2017-02-06T07:59:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfc3f492934438428ac465c580d1f1d9c0f36dbd","assignee":{"login":"namenu","id":243097,"avatar_url":"https://avatars.githubusercontent.com/u/243097?v=3","gravatar_id":"","url":"https://api.github.com/users/namenu","html_url":"https://github.com/namenu","followers_url":"https://api.github.com/users/namenu/followers","following_url":"https://api.github.com/users/namenu/following{/other_user}","gists_url":"https://api.github.com/users/namenu/gists{/gist_id}","starred_url":"https://api.github.com/users/namenu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namenu/subscriptions","organizations_url":"https://api.github.com/users/namenu/orgs","repos_url":"https://api.github.com/users/namenu/repos","events_url":"https://api.github.com/users/namenu/events{/privacy}","received_events_url":"https://api.github.com/users/namenu/received_events","type":"User","site_admin":false},"assignees":[{"login":"namenu","id":243097,"avatar_url":"https://avatars.githubusercontent.com/u/243097?v=3","gravatar_id":"","url":"https://api.github.com/users/namenu","html_url":"https://github.com/namenu","followers_url":"https://api.github.com/users/namenu/followers","following_url":"https://api.github.com/users/namenu/following{/other_user}","gists_url":"https://api.github.com/users/namenu/gists{/gist_id}","starred_url":"https://api.github.com/users/namenu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namenu/subscriptions","organizations_url":"https://api.github.com/users/namenu/orgs","repos_url":"https://api.github.com/users/namenu/repos","events_url":"https://api.github.com/users/namenu/events{/privacy}","received_events_url":"https://api.github.com/users/namenu/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ridibooks/intranet/pulls/18/commits","review_comments_url":"https://api.github.com/repos/ridibooks/intranet/pulls/18/comments","review_comment_url":"https://api.github.com/repos/ridibooks/intranet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ridibooks/intranet/issues/18/comments","statuses_url":"https://api.github.com/repos/ridibooks/intranet/statuses/d5cd669c1c884e7912cd7d80c9ddb562aeb21b2c","head":{"label":"ridibooks:remove_old_controller","ref":"remove_old_controller","sha":"d5cd669c1c884e7912cd7d80c9ddb562aeb21b2c","user":{"login":"ridibooks","id":3690397,"avatar_url":"https://avatars.githubusercontent.com/u/3690397?v=3","gravatar_id":"","url":"https://api.github.com/users/ridibooks","html_url":"https://github.com/ridibooks","followers_url":"https://api.github.com/users/ridibooks/followers","following_url":"https://api.github.com/users/ridibooks/following{/other_user}","gists_url":"https://api.github.com/users/ridibooks/gists{/gist_id}","starred_url":"https://api.github.com/users/ridibooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridibooks/subscriptions","organizations_url":"https://api.github.com/users/ridibooks/orgs","repos_url":"https://api.github.com/users/ridibooks/repos","events_url":"https://api.github.com/users/ridibooks/events{/privacy}","received_events_url":"https://api.github.com/users/ridibooks/received_events","type":"Organization","site_admin":false},"repo":{"id":76357645,"name":"intranet","full_name":"ridibooks/intranet","owner":{"login":"ridibooks","id":3690397,"avatar_url":"https://avatars.githubusercontent.com/u/3690397?v=3","gravatar_id":"","url":"https://api.github.com/users/ridibooks","html_url":"https://github.com/ridibooks","followers_url":"https://api.github.com/users/ridibooks/followers","following_url":"https://api.github.com/users/ridibooks/following{/other_user}","gists_url":"https://api.github.com/users/ridibooks/gists{/gist_id}","starred_url":"https://api.github.com/users/ridibooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridibooks/subscriptions","organizations_url":"https://api.github.com/users/ridibooks/orgs","repos_url":"https://api.github.com/users/ridibooks/repos","events_url":"https://api.github.com/users/ridibooks/events{/privacy}","received_events_url":"https://api.github.com/users/ridibooks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ridibooks/intranet","description":"리디주식회사 인트라넷","fork":false,"url":"https://api.github.com/repos/ridibooks/intranet","forks_url":"https://api.github.com/repos/ridibooks/intranet/forks","keys_url":"https://api.github.com/repos/ridibooks/intranet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ridibooks/intranet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ridibooks/intranet/teams","hooks_url":"https://api.github.com/repos/ridibooks/intranet/hooks","issue_events_url":"https://api.github.com/repos/ridibooks/intranet/issues/events{/number}","events_url":"https://api.github.com/repos/ridibooks/intranet/events","assignees_url":"https://api.github.com/repos/ridibooks/intranet/assignees{/user}","branches_url":"https://api.github.com/repos/ridibooks/intranet/branches{/branch}","tags_url":"https://api.github.com/repos/ridibooks/intranet/tags","blobs_url":"https://api.github.com/repos/ridibooks/intranet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ridibooks/intranet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ridibooks/intranet/git/refs{/sha}","trees_url":"https://api.github.com/repos/ridibooks/intranet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ridibooks/intranet/statuses/{sha}","languages_url":"https://api.github.com/repos/ridibooks/intranet/languages","stargazers_url":"https://api.github.com/repos/ridibooks/intranet/stargazers","contributors_url":"https://api.github.com/repos/ridibooks/intranet/contributors","subscribers_url":"https://api.github.com/repos/ridibooks/intranet/subscribers","subscription_url":"https://api.github.com/repos/ridibooks/intranet/subscription","commits_url":"https://api.github.com/repos/ridibooks/intranet/commits{/sha}","git_commits_url":"https://api.github.com/repos/ridibooks/intranet/git/commits{/sha}","comments_url":"https://api.github.com/repos/ridibooks/intranet/comments{/number}","issue_comment_url":"https://api.github.com/repos/ridibooks/intranet/issues/comments{/number}","contents_url":"https://api.github.com/repos/ridibooks/intranet/contents/{+path}","compare_url":"https://api.github.com/repos/ridibooks/intranet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ridibooks/intranet/merges","archive_url":"https://api.github.com/repos/ridibooks/intranet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ridibooks/intranet/downloads","issues_url":"https://api.github.com/repos/ridibooks/intranet/issues{/number}","pulls_url":"https://api.github.com/repos/ridibooks/intranet/pulls{/number}","milestones_url":"https://api.github.com/repos/ridibooks/intranet/milestones{/number}","notifications_url":"https://api.github.com/repos/ridibooks/intranet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ridibooks/intranet/labels{/name}","releases_url":"https://api.github.com/repos/ridibooks/intranet/releases{/id}","deployments_url":"https://api.github.com/repos/ridibooks/intranet/deployments","created_at":"2016-12-13T12:40:19Z","updated_at":"2017-01-26T01:26:54Z","pushed_at":"2017-02-06T06:47:23Z","git_url":"git://github.com/ridibooks/intranet.git","ssh_url":"git@github.com:ridibooks/intranet.git","clone_url":"https://github.com/ridibooks/intranet.git","svn_url":"https://github.com/ridibooks/intranet","homepage":"","size":25341,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":4,"forks":4,"open_issues":4,"watchers":3,"default_branch":"master"}},"base":{"label":"ridibooks:master","ref":"master","sha":"31b93123f480007bdc2056158f6e35c739165214","user":{"login":"ridibooks","id":3690397,"avatar_url":"https://avatars.githubusercontent.com/u/3690397?v=3","gravatar_id":"","url":"https://api.github.com/users/ridibooks","html_url":"https://github.com/ridibooks","followers_url":"https://api.github.com/users/ridibooks/followers","following_url":"https://api.github.com/users/ridibooks/following{/other_user}","gists_url":"https://api.github.com/users/ridibooks/gists{/gist_id}","starred_url":"https://api.github.com/users/ridibooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridibooks/subscriptions","organizations_url":"https://api.github.com/users/ridibooks/orgs","repos_url":"https://api.github.com/users/ridibooks/repos","events_url":"https://api.github.com/users/ridibooks/events{/privacy}","received_events_url":"https://api.github.com/users/ridibooks/received_events","type":"Organization","site_admin":false},"repo":{"id":76357645,"name":"intranet","full_name":"ridibooks/intranet","owner":{"login":"ridibooks","id":3690397,"avatar_url":"https://avatars.githubusercontent.com/u/3690397?v=3","gravatar_id":"","url":"https://api.github.com/users/ridibooks","html_url":"https://github.com/ridibooks","followers_url":"https://api.github.com/users/ridibooks/followers","following_url":"https://api.github.com/users/ridibooks/following{/other_user}","gists_url":"https://api.github.com/users/ridibooks/gists{/gist_id}","starred_url":"https://api.github.com/users/ridibooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridibooks/subscriptions","organizations_url":"https://api.github.com/users/ridibooks/orgs","repos_url":"https://api.github.com/users/ridibooks/repos","events_url":"https://api.github.com/users/ridibooks/events{/privacy}","received_events_url":"https://api.github.com/users/ridibooks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ridibooks/intranet","description":"리디주식회사 인트라넷","fork":false,"url":"https://api.github.com/repos/ridibooks/intranet","forks_url":"https://api.github.com/repos/ridibooks/intranet/forks","keys_url":"https://api.github.com/repos/ridibooks/intranet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ridibooks/intranet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ridibooks/intranet/teams","hooks_url":"https://api.github.com/repos/ridibooks/intranet/hooks","issue_events_url":"https://api.github.com/repos/ridibooks/intranet/issues/events{/number}","events_url":"https://api.github.com/repos/ridibooks/intranet/events","assignees_url":"https://api.github.com/repos/ridibooks/intranet/assignees{/user}","branches_url":"https://api.github.com/repos/ridibooks/intranet/branches{/branch}","tags_url":"https://api.github.com/repos/ridibooks/intranet/tags","blobs_url":"https://api.github.com/repos/ridibooks/intranet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ridibooks/intranet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ridibooks/intranet/git/refs{/sha}","trees_url":"https://api.github.com/repos/ridibooks/intranet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ridibooks/intranet/statuses/{sha}","languages_url":"https://api.github.com/repos/ridibooks/intranet/languages","stargazers_url":"https://api.github.com/repos/ridibooks/intranet/stargazers","contributors_url":"https://api.github.com/repos/ridibooks/intranet/contributors","subscribers_url":"https://api.github.com/repos/ridibooks/intranet/subscribers","subscription_url":"https://api.github.com/repos/ridibooks/intranet/subscription","commits_url":"https://api.github.com/repos/ridibooks/intranet/commits{/sha}","git_commits_url":"https://api.github.com/repos/ridibooks/intranet/git/commits{/sha}","comments_url":"https://api.github.com/repos/ridibooks/intranet/comments{/number}","issue_comment_url":"https://api.github.com/repos/ridibooks/intranet/issues/comments{/number}","contents_url":"https://api.github.com/repos/ridibooks/intranet/contents/{+path}","compare_url":"https://api.github.com/repos/ridibooks/intranet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ridibooks/intranet/merges","archive_url":"https://api.github.com/repos/ridibooks/intranet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ridibooks/intranet/downloads","issues_url":"https://api.github.com/repos/ridibooks/intranet/issues{/number}","pulls_url":"https://api.github.com/repos/ridibooks/intranet/pulls{/number}","milestones_url":"https://api.github.com/repos/ridibooks/intranet/milestones{/number}","notifications_url":"https://api.github.com/repos/ridibooks/intranet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ridibooks/intranet/labels{/name}","releases_url":"https://api.github.com/repos/ridibooks/intranet/releases{/id}","deployments_url":"https://api.github.com/repos/ridibooks/intranet/deployments","created_at":"2016-12-13T12:40:19Z","updated_at":"2017-01-26T01:26:54Z","pushed_at":"2017-02-06T06:47:23Z","git_url":"git://github.com/ridibooks/intranet.git","ssh_url":"git@github.com:ridibooks/intranet.git","clone_url":"https://github.com/ridibooks/intranet.git","svn_url":"https://github.com/ridibooks/intranet","homepage":"","size":25341,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":4,"forks":4,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ridibooks/intranet/pulls/18"},"html":{"href":"https://github.com/ridibooks/intranet/pull/18"},"issue":{"href":"https://api.github.com/repos/ridibooks/intranet/issues/18"},"comments":{"href":"https://api.github.com/repos/ridibooks/intranet/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/ridibooks/intranet/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/ridibooks/intranet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ridibooks/intranet/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/ridibooks/intranet/statuses/d5cd669c1c884e7912cd7d80c9ddb562aeb21b2c"}}}}
{"actor":{"display_login":"namenu"}}