{"action":"created","comment":{"url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/comments/182661403","pull_request_review_id":113500482,"id":182661403,"diff_hunk":"@@ -0,0 +1,146 @@\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\\Stepup\\Identity\\Event;\n+\n+use Surfnet\\Stepup\\DateTime\\DateTime;\n+use Surfnet\\Stepup\\Identity\\AuditLog\\Metadata;\n+use Surfnet\\Stepup\\Identity\\Value\\CommonName;\n+use Surfnet\\Stepup\\Identity\\Value\\Email;\n+use Surfnet\\Stepup\\Identity\\Value\\IdentityId;\n+use Surfnet\\Stepup\\Identity\\Value\\Institution;\n+use Surfnet\\Stepup\\Identity\\Value\\SecondFactorId;\n+use Surfnet\\Stepup\\Identity\\Value\\YubikeyPublicId;\n+use Surfnet\\StepupBundle\\Value\\SecondFactorType;\n+use Surfnet\\StepupMiddleware\\CommandHandlingBundle\\SensitiveData\\Forgettable;\n+use Surfnet\\StepupMiddleware\\CommandHandlingBundle\\SensitiveData\\SensitiveData;\n+\n+class YubikeyPossessionProvenAndVerifiedEvent extends IdentityEvent implements Forgettable\n+{\n+    /**\n+     * @var \\Surfnet\\Stepup\\Identity\\Value\\SecondFactorId\n+     */\n+    public $secondFactorId;\n+\n+    /**\n+     * The Yubikey's public ID.\n+     *\n+     * @var \\Surfnet\\Stepup\\Identity\\Value\\YubikeyPublicId\n+     */\n+    public $yubikeyPublicId;\n+\n+    /**\n+     * @var \\Surfnet\\Stepup\\Identity\\Value\\CommonName\n+     */\n+    public $commonName;\n+\n+    /**\n+     * @var \\Surfnet\\Stepup\\Identity\\Value\\Email\n+     */\n+    public $email;\n+\n+    /**\n+     * @var \\Surfnet\\Stepup\\DateTime\\DateTime\n+     */\n+    public $registrationRequestedAt;\n+\n+    /**\n+     * @var string\n+     */\n+    public $registrationCode;\n+\n+    /**\n+     * @param IdentityId              $identityId\n+     * @param Institution             $institution\n+     * @param SecondFactorId          $secondFactorId\n+     * @param YubikeyPublicId         $yubikeyPublicId\n+     * @param CommonName              $commonName\n+     * @param Email                   $email\n+     * @param DateTime                $registrationRequestedAt\n+     * @param string                  $registrationCode\n+     */\n+    public function __construct(\n+        IdentityId $identityId,\n+        Institution $institution,\n+        SecondFactorId $secondFactorId,\n+        YubikeyPublicId $yubikeyPublicId,\n+        CommonName $commonName,\n+        Email $email,\n+        DateTime $registrationRequestedAt,","path":"src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php","position":84,"original_position":84,"commit_id":"9242ece4fee8997717766b8182875047bc14da74","original_commit_id":"9242ece4fee8997717766b8182875047bc14da74","user":{"login":"jorissteyn","id":448056,"avatar_url":"https://avatars3.githubusercontent.com/u/448056?v=4","gravatar_id":"","url":"https://api.github.com/users/jorissteyn","html_url":"https://github.com/jorissteyn","followers_url":"https://api.github.com/users/jorissteyn/followers","following_url":"https://api.github.com/users/jorissteyn/following{/other_user}","gists_url":"https://api.github.com/users/jorissteyn/gists{/gist_id}","starred_url":"https://api.github.com/users/jorissteyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorissteyn/subscriptions","organizations_url":"https://api.github.com/users/jorissteyn/orgs","repos_url":"https://api.github.com/users/jorissteyn/repos","events_url":"https://api.github.com/users/jorissteyn/events{/privacy}","received_events_url":"https://api.github.com/users/jorissteyn/received_events","type":"User","site_admin":false},"body":"I've checked and fixed all constructor assignments.","created_at":"2018-04-19T07:57:57Z","updated_at":"2018-04-19T07:57:57Z","html_url":"https://github.com/OpenConext/Stepup-Middleware/pull/221#discussion_r182661403","pull_request_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/221","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/comments/182661403"},"html":{"href":"https://github.com/OpenConext/Stepup-Middleware/pull/221#discussion_r182661403"},"pull_request":{"href":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/221"}},"in_reply_to_id":182650684},"pull_request":{"url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/221","id":182392494,"html_url":"https://github.com/OpenConext/Stepup-Middleware/pull/221","diff_url":"https://github.com/OpenConext/Stepup-Middleware/pull/221.diff","patch_url":"https://github.com/OpenConext/Stepup-Middleware/pull/221.patch","issue_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/issues/221","number":221,"state":"open","locked":false,"title":"Skip transition of unverified -> verified when email is disabled (new \"proven\" event)","user":{"login":"jorissteyn","id":448056,"avatar_url":"https://avatars3.githubusercontent.com/u/448056?v=4","gravatar_id":"","url":"https://api.github.com/users/jorissteyn","html_url":"https://github.com/jorissteyn","followers_url":"https://api.github.com/users/jorissteyn/followers","following_url":"https://api.github.com/users/jorissteyn/following{/other_user}","gists_url":"https://api.github.com/users/jorissteyn/gists{/gist_id}","starred_url":"https://api.github.com/users/jorissteyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorissteyn/subscriptions","organizations_url":"https://api.github.com/users/jorissteyn/orgs","repos_url":"https://api.github.com/users/jorissteyn/repos","events_url":"https://api.github.com/users/jorissteyn/events{/privacy}","received_events_url":"https://api.github.com/users/jorissteyn/received_events","type":"User","site_admin":false},"body":"Institutions which do not require email verification found 'Email\r\nverified' events in the audit log.\r\n\r\nPrevious implementation was internally creating an unverified second\r\nfactor and using the verify-email event to transition it to verified,\r\ncausing this unwanted effect. The new implementation skips the\r\ncreationg of unverified second factors altogether.\r\n\r\nSo, with email verification:\r\n\r\n    user proves possession -> create unverified -> user verifies email -> transition to verified\r\n\r\nPreviously, without email verification\r\n\r\n    user proves possession -> create unverified -> transition to verified\r\n\r\nNew implementation, without email verification\r\n\r\n    user proves possession -> create verified\r\n\r\nThis is achieved by creating new 'proven and verified' events for\r\ntokens which are implicitly verified by the Idp. These events are\r\nhandled differently from the regular 'proven' events, and to maintain\r\ncompatibility with the previous way of working, handling of those\r\nregular events is unchanged.","created_at":"2018-04-18T07:41:46Z","updated_at":"2018-04-19T07:57:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d83f82b4dcfa73ca804708f8177b564150fc6c41","assignee":null,"assignees":[],"requested_reviewers":[{"login":"pmeulen","id":1485300,"avatar_url":"https://avatars0.githubusercontent.com/u/1485300?v=4","gravatar_id":"","url":"https://api.github.com/users/pmeulen","html_url":"https://github.com/pmeulen","followers_url":"https://api.github.com/users/pmeulen/followers","following_url":"https://api.github.com/users/pmeulen/following{/other_user}","gists_url":"https://api.github.com/users/pmeulen/gists{/gist_id}","starred_url":"https://api.github.com/users/pmeulen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmeulen/subscriptions","organizations_url":"https://api.github.com/users/pmeulen/orgs","repos_url":"https://api.github.com/users/pmeulen/repos","events_url":"https://api.github.com/users/pmeulen/events{/privacy}","received_events_url":"https://api.github.com/users/pmeulen/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":257734093,"url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/labels/wip","name":"wip","color":"207de5","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/221/commits","review_comments_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/221/comments","review_comment_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/issues/221/comments","statuses_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/statuses/9242ece4fee8997717766b8182875047bc14da74","head":{"label":"OpenConext:feature/verify-email-new-proven-event","ref":"feature/verify-email-new-proven-event","sha":"9242ece4fee8997717766b8182875047bc14da74","user":{"login":"OpenConext","id":1457650,"avatar_url":"https://avatars2.githubusercontent.com/u/1457650?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenConext","html_url":"https://github.com/OpenConext","followers_url":"https://api.github.com/users/OpenConext/followers","following_url":"https://api.github.com/users/OpenConext/following{/other_user}","gists_url":"https://api.github.com/users/OpenConext/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenConext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenConext/subscriptions","organizations_url":"https://api.github.com/users/OpenConext/orgs","repos_url":"https://api.github.com/users/OpenConext/repos","events_url":"https://api.github.com/users/OpenConext/events{/privacy}","received_events_url":"https://api.github.com/users/OpenConext/received_events","type":"Organization","site_admin":false},"repo":{"id":23867318,"name":"Stepup-Middleware","full_name":"OpenConext/Stepup-Middleware","owner":{"login":"OpenConext","id":1457650,"avatar_url":"https://avatars2.githubusercontent.com/u/1457650?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenConext","html_url":"https://github.com/OpenConext","followers_url":"https://api.github.com/users/OpenConext/followers","following_url":"https://api.github.com/users/OpenConext/following{/other_user}","gists_url":"https://api.github.com/users/OpenConext/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenConext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenConext/subscriptions","organizations_url":"https://api.github.com/users/OpenConext/orgs","repos_url":"https://api.github.com/users/OpenConext/repos","events_url":"https://api.github.com/users/OpenConext/events{/privacy}","received_events_url":"https://api.github.com/users/OpenConext/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenConext/Stepup-Middleware","description":"Stepup Middleware","fork":false,"url":"https://api.github.com/repos/OpenConext/Stepup-Middleware","forks_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/forks","keys_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/teams","hooks_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/hooks","issue_events_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/issues/events{/number}","events_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/events","assignees_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/assignees{/user}","branches_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/branches{/branch}","tags_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/tags","blobs_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/languages","stargazers_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/stargazers","contributors_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/contributors","subscribers_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/subscribers","subscription_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/subscription","commits_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/contents/{+path}","compare_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/merges","archive_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/downloads","issues_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/issues{/number}","pulls_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/labels{/name}","releases_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/releases{/id}","deployments_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/deployments","created_at":"2014-09-10T08:47:14Z","updated_at":"2018-04-16T07:47:03Z","pushed_at":"2018-04-19T07:57:21Z","git_url":"git://github.com/OpenConext/Stepup-Middleware.git","ssh_url":"git@github.com:OpenConext/Stepup-Middleware.git","clone_url":"https://github.com/OpenConext/Stepup-Middleware.git","svn_url":"https://github.com/OpenConext/Stepup-Middleware","homepage":"","size":2540,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":1,"watchers":2,"default_branch":"develop"}},"base":{"label":"OpenConext:develop","ref":"develop","sha":"6a0b2d44729effdbb21d45a2929bdb1adf881756","user":{"login":"OpenConext","id":1457650,"avatar_url":"https://avatars2.githubusercontent.com/u/1457650?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenConext","html_url":"https://github.com/OpenConext","followers_url":"https://api.github.com/users/OpenConext/followers","following_url":"https://api.github.com/users/OpenConext/following{/other_user}","gists_url":"https://api.github.com/users/OpenConext/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenConext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenConext/subscriptions","organizations_url":"https://api.github.com/users/OpenConext/orgs","repos_url":"https://api.github.com/users/OpenConext/repos","events_url":"https://api.github.com/users/OpenConext/events{/privacy}","received_events_url":"https://api.github.com/users/OpenConext/received_events","type":"Organization","site_admin":false},"repo":{"id":23867318,"name":"Stepup-Middleware","full_name":"OpenConext/Stepup-Middleware","owner":{"login":"OpenConext","id":1457650,"avatar_url":"https://avatars2.githubusercontent.com/u/1457650?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenConext","html_url":"https://github.com/OpenConext","followers_url":"https://api.github.com/users/OpenConext/followers","following_url":"https://api.github.com/users/OpenConext/following{/other_user}","gists_url":"https://api.github.com/users/OpenConext/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenConext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenConext/subscriptions","organizations_url":"https://api.github.com/users/OpenConext/orgs","repos_url":"https://api.github.com/users/OpenConext/repos","events_url":"https://api.github.com/users/OpenConext/events{/privacy}","received_events_url":"https://api.github.com/users/OpenConext/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenConext/Stepup-Middleware","description":"Stepup Middleware","fork":false,"url":"https://api.github.com/repos/OpenConext/Stepup-Middleware","forks_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/forks","keys_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/teams","hooks_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/hooks","issue_events_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/issues/events{/number}","events_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/events","assignees_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/assignees{/user}","branches_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/branches{/branch}","tags_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/tags","blobs_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/languages","stargazers_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/stargazers","contributors_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/contributors","subscribers_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/subscribers","subscription_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/subscription","commits_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/contents/{+path}","compare_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/merges","archive_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/downloads","issues_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/issues{/number}","pulls_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/labels{/name}","releases_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/releases{/id}","deployments_url":"https://api.github.com/repos/OpenConext/Stepup-Middleware/deployments","created_at":"2014-09-10T08:47:14Z","updated_at":"2018-04-16T07:47:03Z","pushed_at":"2018-04-19T07:57:21Z","git_url":"git://github.com/OpenConext/Stepup-Middleware.git","ssh_url":"git@github.com:OpenConext/Stepup-Middleware.git","clone_url":"https://github.com/OpenConext/Stepup-Middleware.git","svn_url":"https://github.com/OpenConext/Stepup-Middleware","homepage":"","size":2540,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":1,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/221"},"html":{"href":"https://github.com/OpenConext/Stepup-Middleware/pull/221"},"issue":{"href":"https://api.github.com/repos/OpenConext/Stepup-Middleware/issues/221"},"comments":{"href":"https://api.github.com/repos/OpenConext/Stepup-Middleware/issues/221/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/221/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenConext/Stepup-Middleware/pulls/221/commits"},"statuses":{"href":"https://api.github.com/repos/OpenConext/Stepup-Middleware/statuses/9242ece4fee8997717766b8182875047bc14da74"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jorissteyn"}}