{"action":"created","comment":{"url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/comments/65246023","id":65246023,"diff_hunk":"@@ -0,0 +1,261 @@\n+<?php\n+\n+/**\n+ * Copyright 2014 SURFnet bv\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+namespace Surfnet\\StepupGateway\\SecondFactorOnlyBundle\\Controller;\n+\n+use Exception;\n+use Psr\\Log\\LoggerInterface;\n+use Surfnet\\SamlBundle\\SAML2\\AuthnRequest;\n+use Surfnet\\StepupBundle\\Value\\Loa;\n+use Surfnet\\StepupGateway\\SecondFactorOnlyBundle\\Saml\\ResponseFactory;\n+use Surfnet\\StepupGateway\\SecondFactorOnlyBundle\\Service\\LoaAliasLookupService;\n+use Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+use Symfony\\Component\\HttpFoundation\\Response;\n+use Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException;\n+\n+class SecondFactorOnlyController extends Controller\n+{\n+    const RESPONSE_CONTEXT_SERVICE_ID = 'second_factor_only.response_context';\n+\n+    /**\n+     * @param Request $httpRequest\n+     * @return Response\n+     */\n+    public function ssoAction(Request $httpRequest)\n+    {\n+        $logger = $this->get('logger');\n+\n+        if (!$this->get('service_container')->getParameter('second_factor_only')) {","path":"src/Surfnet/StepupGateway/SecondFactorOnlyBundle/Controller/SecondFactorOnlyController.php","position":44,"original_position":44,"commit_id":"9768737806fd38002388531ca5814d13459c82c3","original_commit_id":"e1e03a5a36ca7fb0b020a3ec54f138a23e835d69","user":{"login":"relaxnow","id":524386,"avatar_url":"https://avatars.githubusercontent.com/u/524386?v=3","gravatar_id":"","url":"https://api.github.com/users/relaxnow","html_url":"https://github.com/relaxnow","followers_url":"https://api.github.com/users/relaxnow/followers","following_url":"https://api.github.com/users/relaxnow/following{/other_user}","gists_url":"https://api.github.com/users/relaxnow/gists{/gist_id}","starred_url":"https://api.github.com/users/relaxnow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/relaxnow/subscriptions","organizations_url":"https://api.github.com/users/relaxnow/orgs","repos_url":"https://api.github.com/users/relaxnow/repos","events_url":"https://api.github.com/users/relaxnow/events{/privacy}","received_events_url":"https://api.github.com/users/relaxnow/received_events","type":"User","site_admin":false},"body":"Weird, I autocompletion didn't pick that up. Thanks, fixed.","created_at":"2016-05-31T19:20:53Z","updated_at":"2016-05-31T19:20:53Z","html_url":"https://github.com/SURFnet/Stepup-Gateway/pull/93#discussion_r65246023","pull_request_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/comments/65246023"},"html":{"href":"https://github.com/SURFnet/Stepup-Gateway/pull/93#discussion_r65246023"},"pull_request":{"href":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/93","id":71969157,"html_url":"https://github.com/SURFnet/Stepup-Gateway/pull/93","diff_url":"https://github.com/SURFnet/Stepup-Gateway/pull/93.diff","patch_url":"https://github.com/SURFnet/Stepup-Gateway/pull/93.patch","issue_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/issues/93","number":93,"state":"open","locked":false,"title":"Second Factor Only","user":{"login":"relaxnow","id":524386,"avatar_url":"https://avatars.githubusercontent.com/u/524386?v=3","gravatar_id":"","url":"https://api.github.com/users/relaxnow","html_url":"https://github.com/relaxnow","followers_url":"https://api.github.com/users/relaxnow/followers","following_url":"https://api.github.com/users/relaxnow/following{/other_user}","gists_url":"https://api.github.com/users/relaxnow/gists{/gist_id}","starred_url":"https://api.github.com/users/relaxnow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/relaxnow/subscriptions","organizations_url":"https://api.github.com/users/relaxnow/orgs","repos_url":"https://api.github.com/users/relaxnow/repos","events_url":"https://api.github.com/users/relaxnow/events{/privacy}","received_events_url":"https://api.github.com/users/relaxnow/received_events","type":"User","site_admin":false},"body":"This PR adds a /second-factor-only endpoint that allows SPs to only query a users second factor.\r\nFor security reasons it has it's own metadata endpoint (/second-factor-only/metadata) and it's own LOA aliases / AuthnContextClassRefs. Also only Service Providers that have the ```second_factor_only``` config set to true and the ```second_factor_only_nameid_patterns``` configuration set with appropriate nameid patterns that may use this functionality.\r\nIt may be enabled by setting the parameter like so:\r\n```second_factor_only: true```","created_at":"2016-05-31T07:25:34Z","updated_at":"2016-05-31T19:20:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b07204e2ce4fc7580846b3f55e4e0d7a4c1277dd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/93/commits","review_comments_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/93/comments","review_comment_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/issues/93/comments","statuses_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/statuses/9768737806fd38002388531ca5814d13459c82c3","head":{"label":"relaxnow:feature/second-factor-only-2","ref":"feature/second-factor-only-2","sha":"9768737806fd38002388531ca5814d13459c82c3","user":{"login":"relaxnow","id":524386,"avatar_url":"https://avatars.githubusercontent.com/u/524386?v=3","gravatar_id":"","url":"https://api.github.com/users/relaxnow","html_url":"https://github.com/relaxnow","followers_url":"https://api.github.com/users/relaxnow/followers","following_url":"https://api.github.com/users/relaxnow/following{/other_user}","gists_url":"https://api.github.com/users/relaxnow/gists{/gist_id}","starred_url":"https://api.github.com/users/relaxnow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/relaxnow/subscriptions","organizations_url":"https://api.github.com/users/relaxnow/orgs","repos_url":"https://api.github.com/users/relaxnow/repos","events_url":"https://api.github.com/users/relaxnow/events{/privacy}","received_events_url":"https://api.github.com/users/relaxnow/received_events","type":"User","site_admin":false},"repo":{"id":59277279,"name":"Stepup-Gateway","full_name":"relaxnow/Stepup-Gateway","owner":{"login":"relaxnow","id":524386,"avatar_url":"https://avatars.githubusercontent.com/u/524386?v=3","gravatar_id":"","url":"https://api.github.com/users/relaxnow","html_url":"https://github.com/relaxnow","followers_url":"https://api.github.com/users/relaxnow/followers","following_url":"https://api.github.com/users/relaxnow/following{/other_user}","gists_url":"https://api.github.com/users/relaxnow/gists{/gist_id}","starred_url":"https://api.github.com/users/relaxnow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/relaxnow/subscriptions","organizations_url":"https://api.github.com/users/relaxnow/orgs","repos_url":"https://api.github.com/users/relaxnow/repos","events_url":"https://api.github.com/users/relaxnow/events{/privacy}","received_events_url":"https://api.github.com/users/relaxnow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/relaxnow/Stepup-Gateway","description":"","fork":true,"url":"https://api.github.com/repos/relaxnow/Stepup-Gateway","forks_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/forks","keys_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/teams","hooks_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/hooks","issue_events_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/issues/events{/number}","events_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/events","assignees_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/assignees{/user}","branches_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/branches{/branch}","tags_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/tags","blobs_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/languages","stargazers_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/stargazers","contributors_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/contributors","subscribers_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/subscribers","subscription_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/subscription","commits_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/contents/{+path}","compare_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/merges","archive_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/downloads","issues_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/issues{/number}","pulls_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/labels{/name}","releases_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/releases{/id}","deployments_url":"https://api.github.com/repos/relaxnow/Stepup-Gateway/deployments","created_at":"2016-05-20T08:21:26Z","updated_at":"2016-05-20T08:21:27Z","pushed_at":"2016-05-31T14:47:08Z","git_url":"git://github.com/relaxnow/Stepup-Gateway.git","ssh_url":"git@github.com:relaxnow/Stepup-Gateway.git","clone_url":"https://github.com/relaxnow/Stepup-Gateway.git","svn_url":"https://github.com/relaxnow/Stepup-Gateway","homepage":null,"size":1566,"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":"SURFnet:develop","ref":"develop","sha":"531c12244ac03e8509386ec66c6c11dce1a8d71f","user":{"login":"SURFnet","id":1485353,"avatar_url":"https://avatars.githubusercontent.com/u/1485353?v=3","gravatar_id":"","url":"https://api.github.com/users/SURFnet","html_url":"https://github.com/SURFnet","followers_url":"https://api.github.com/users/SURFnet/followers","following_url":"https://api.github.com/users/SURFnet/following{/other_user}","gists_url":"https://api.github.com/users/SURFnet/gists{/gist_id}","starred_url":"https://api.github.com/users/SURFnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SURFnet/subscriptions","organizations_url":"https://api.github.com/users/SURFnet/orgs","repos_url":"https://api.github.com/users/SURFnet/repos","events_url":"https://api.github.com/users/SURFnet/events{/privacy}","received_events_url":"https://api.github.com/users/SURFnet/received_events","type":"Organization","site_admin":false},"repo":{"id":23867391,"name":"Stepup-Gateway","full_name":"SURFnet/Stepup-Gateway","owner":{"login":"SURFnet","id":1485353,"avatar_url":"https://avatars.githubusercontent.com/u/1485353?v=3","gravatar_id":"","url":"https://api.github.com/users/SURFnet","html_url":"https://github.com/SURFnet","followers_url":"https://api.github.com/users/SURFnet/followers","following_url":"https://api.github.com/users/SURFnet/following{/other_user}","gists_url":"https://api.github.com/users/SURFnet/gists{/gist_id}","starred_url":"https://api.github.com/users/SURFnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SURFnet/subscriptions","organizations_url":"https://api.github.com/users/SURFnet/orgs","repos_url":"https://api.github.com/users/SURFnet/repos","events_url":"https://api.github.com/users/SURFnet/events{/privacy}","received_events_url":"https://api.github.com/users/SURFnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SURFnet/Stepup-Gateway","description":"","fork":false,"url":"https://api.github.com/repos/SURFnet/Stepup-Gateway","forks_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/forks","keys_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/teams","hooks_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/hooks","issue_events_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/issues/events{/number}","events_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/events","assignees_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/assignees{/user}","branches_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/branches{/branch}","tags_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/tags","blobs_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/languages","stargazers_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/stargazers","contributors_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/contributors","subscribers_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/subscribers","subscription_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/subscription","commits_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/contents/{+path}","compare_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/merges","archive_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/downloads","issues_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/issues{/number}","pulls_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/labels{/name}","releases_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/releases{/id}","deployments_url":"https://api.github.com/repos/SURFnet/Stepup-Gateway/deployments","created_at":"2014-09-10T08:48:54Z","updated_at":"2016-01-27T16:37:19Z","pushed_at":"2016-05-31T19:20:29Z","git_url":"git://github.com/SURFnet/Stepup-Gateway.git","ssh_url":"git@github.com:SURFnet/Stepup-Gateway.git","clone_url":"https://github.com/SURFnet/Stepup-Gateway.git","svn_url":"https://github.com/SURFnet/Stepup-Gateway","homepage":null,"size":1583,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/93"},"html":{"href":"https://github.com/SURFnet/Stepup-Gateway/pull/93"},"issue":{"href":"https://api.github.com/repos/SURFnet/Stepup-Gateway/issues/93"},"comments":{"href":"https://api.github.com/repos/SURFnet/Stepup-Gateway/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SURFnet/Stepup-Gateway/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/SURFnet/Stepup-Gateway/statuses/9768737806fd38002388531ca5814d13459c82c3"}}}}
{"actor":{"display_login":"relaxnow"}}