diff --git a/config/packages/events.yaml b/config/packages/events.yaml index 047a1e4dc..4c76b0e48 100644 --- a/config/packages/events.yaml +++ b/config/packages/events.yaml @@ -38,7 +38,7 @@ parameters: - Surfnet\Stepup\Identity\Event\InstitutionsRemovedFromWhitelistEvent - Surfnet\Stepup\Identity\Event\U2fDevicePossessionProvenEvent - Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent - - Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent + - Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent - Surfnet\Stepup\Identity\Event\VerifiedSecondFactorRevokedEvent - Surfnet\Stepup\Identity\Event\WhitelistCreatedEvent - Surfnet\Stepup\Identity\Event\UnverifiedSecondFactorRevokedEvent diff --git a/docs/personal-data.md b/docs/personal-data.md index c231ffe35..b29f64962 100644 --- a/docs/personal-data.md +++ b/docs/personal-data.md @@ -215,7 +215,7 @@ A list of all the [Identity events]((../src/Surfnet/Stepup/Identity/Event/) in s - Forgettable: secondFactorIdentifier - Forgettable: documentNumber -[SecondFactorPossessionSkippedEvent](../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php) +[SecondFactorVettedPossessionSkippedEvent](../src/Surfnet/Stepup/Identity/Event/SecondFactorVettedEvent.php) - identity_id - name_id - identity_institution diff --git a/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php b/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php index fcad92aad..98b5f32c9 100644 --- a/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php +++ b/src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php @@ -24,7 +24,7 @@ use Surfnet\Stepup\Identity\Api\Identity; use Surfnet\Stepup\Identity\Event\CompliedWithVerifiedSecondFactorRevocationEvent; use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; -use Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent; +use Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent; use Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent; use Surfnet\Stepup\Identity\Event\VerifiedSecondFactorRevokedEvent; use Surfnet\Stepup\Identity\Value\DocumentNumber; @@ -143,7 +143,7 @@ public function vet(DocumentNumber $documentNumber, $provePossessionSkipped) { if ($provePossessionSkipped) { $this->apply( - new SecondFactorPossessionSkippedEvent( + new SecondFactorVettedPossessionSkippedEvent( $this->identity->getId(), $this->identity->getNameId(), $this->identity->getInstitution(), diff --git a/src/Surfnet/Stepup/Identity/Event/SecondFactorPossessionSkippedEvent.php b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedPossessionSkippedEvent.php similarity index 98% rename from src/Surfnet/Stepup/Identity/Event/SecondFactorPossessionSkippedEvent.php rename to src/Surfnet/Stepup/Identity/Event/SecondFactorVettedPossessionSkippedEvent.php index 7f1ed24aa..9f33cc55a 100644 --- a/src/Surfnet/Stepup/Identity/Event/SecondFactorPossessionSkippedEvent.php +++ b/src/Surfnet/Stepup/Identity/Event/SecondFactorVettedPossessionSkippedEvent.php @@ -36,7 +36,7 @@ /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class SecondFactorPossessionSkippedEvent extends IdentityEvent implements Forgettable +class SecondFactorVettedPossessionSkippedEvent extends IdentityEvent implements Forgettable { /** * @var \Surfnet\Stepup\Identity\Value\NameId diff --git a/src/Surfnet/Stepup/Identity/Identity.php b/src/Surfnet/Stepup/Identity/Identity.php index 5c5d16e58..d152866a1 100644 --- a/src/Surfnet/Stepup/Identity/Identity.php +++ b/src/Surfnet/Stepup/Identity/Identity.php @@ -56,7 +56,7 @@ use Surfnet\Stepup\Identity\Event\RegistrationAuthorityInformationAmendedForInstitutionEvent; use Surfnet\Stepup\Identity\Event\RegistrationAuthorityRetractedEvent; use Surfnet\Stepup\Identity\Event\RegistrationAuthorityRetractedForInstitutionEvent; -use Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent; +use Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent; use Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent; use Surfnet\Stepup\Identity\Event\U2fDevicePossessionProvenAndVerifiedEvent; use Surfnet\Stepup\Identity\Event\U2fDevicePossessionProvenEvent; @@ -934,7 +934,7 @@ protected function applySecondFactorVettedEvent(SecondFactorVettedEvent $event) $this->vettedSecondFactors->set($secondFactorId, $vetted); } - protected function applySecondFactorPossessionSkippedEvent(SecondFactorPossessionSkippedEvent $event) + protected function applySecondFactorVettedPossessionSkippedEvent(SecondFactorVettedPossessionSkippedEvent $event) { $secondFactorId = (string)$event->secondFactorId; diff --git a/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php b/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php index 8f8fe1a26..854e3ba25 100644 --- a/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php +++ b/src/Surfnet/Stepup/Tests/Identity/Event/ForgettableEventsTest.php @@ -44,7 +44,7 @@ public function certain_events_are_forgettable_events_and_others_are_not() 'Surfnet\Stepup\Identity\Event\RegistrationAuthorityRetractedEvent', 'Surfnet\Stepup\Identity\Event\SecondFactorRevokedEvent', 'Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent', - 'Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent', + 'Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent', 'Surfnet\Stepup\Identity\Event\U2fDevicePossessionProvenEvent', 'Surfnet\Stepup\Identity\Event\U2fDevicePossessionProvenAndVerifiedEvent', 'Surfnet\Stepup\Identity\Event\UnverifiedSecondFactorRevokedEvent', diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php index 1842abbe8..7e824dd9c 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php @@ -20,7 +20,7 @@ use Doctrine\ORM\Mapping as ORM; use JsonSerializable; -use Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent; +use Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent; use Surfnet\StepupMiddleware\ApiBundle\Exception\LogicException; /** @@ -58,7 +58,7 @@ class AuditLogEntry implements JsonSerializable 'Surfnet\Stepup\Identity\Event\PhonePossessionProvenEvent' => 'possession_proven', 'Surfnet\Stepup\Identity\Event\PhonePossessionProvenAndVerifiedEvent' => 'possession_proven', 'Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent' => 'vetted', - 'Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent' => 'vetted', + 'Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent' => 'vetted_possession_unknown', 'Surfnet\Stepup\Identity\Event\UnverifiedSecondFactorRevokedEvent' => 'revoked', 'Surfnet\Stepup\Identity\Event\VerifiedSecondFactorRevokedEvent' => 'revoked', 'Surfnet\Stepup\Identity\Event\VettedSecondFactorRevokedEvent' => 'revoked', diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php index 7bb90b536..1fba661a8 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/RaSecondFactorProjector.php @@ -30,7 +30,7 @@ use Surfnet\Stepup\Identity\Event\IdentityRenamedEvent; use Surfnet\Stepup\Identity\Event\PhonePossessionProvenAndVerifiedEvent; use Surfnet\Stepup\Identity\Event\PhonePossessionProvenEvent; -use Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent; +use Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent; use Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent; use Surfnet\Stepup\Identity\Event\U2fDevicePossessionProvenAndVerifiedEvent; use Surfnet\Stepup\Identity\Event\U2fDevicePossessionProvenEvent; @@ -268,7 +268,7 @@ public function applySecondFactorVettedEvent(SecondFactorVettedEvent $event) $this->raSecondFactorRepository->save($secondFactor); } - public function applySecondFactorPossessionSkippedEvent(SecondFactorPossessionSkippedEvent $event) + public function applySecondFactorVettedPossessionSkippedEvent(SecondFactorVettedPossessionSkippedEvent $event) { $secondFactor = $this->raSecondFactorRepository->find((string) $event->secondFactorId); diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php index 986a41835..b55649eb4 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/SecondFactorProjector.php @@ -28,6 +28,7 @@ use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; use Surfnet\Stepup\Identity\Event\PhonePossessionProvenAndVerifiedEvent; use Surfnet\Stepup\Identity\Event\PhonePossessionProvenEvent; +use Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent; use Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent; use Surfnet\Stepup\Identity\Event\U2fDevicePossessionProvenAndVerifiedEvent; use Surfnet\Stepup\Identity\Event\U2fDevicePossessionProvenEvent; @@ -235,7 +236,7 @@ public function applySecondFactorVettedEvent(SecondFactorVettedEvent $event) $this->verifiedRepository->remove($verified); } - public function applySecondFactorPossessionSkippedEvent(SecondFactorVettedEvent $event) + public function applySecondFactorVettedPossessionSkippedEvent(SecondFactorVettedPossessionSkippedEvent $event) { $verified = $this->verifiedRepository->find($event->secondFactorId->getSecondFactorId()); diff --git a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php index 11c4e1db4..c7e5df6de 100644 --- a/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php +++ b/src/Surfnet/StepupMiddleware/ApiBundle/Identity/Repository/AuditLogRepository.php @@ -21,7 +21,7 @@ use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\ORM\Query; -use Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent; +use Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent; use Surfnet\Stepup\Identity\Value\IdentityId; use Surfnet\StepupMiddleware\ApiBundle\Exception\RuntimeException; use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\AuditLogEntry; @@ -48,8 +48,8 @@ public function __construct(ManagerRegistry $registry) 'Surfnet\Stepup\Identity\Event\PhonePossessionProvenAndVerifiedEvent', 'Surfnet\Stepup\Identity\Event\EmailVerifiedEvent', 'Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent', - 'Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent', - 'Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent', + 'Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent', + 'Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent', 'Surfnet\Stepup\Identity\Event\UnverifiedSecondFactorRevokedEvent', 'Surfnet\Stepup\Identity\Event\VerifiedSecondFactorRevokedEvent', 'Surfnet\Stepup\Identity\Event\VettedSecondFactorRevokedEvent', diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Processor/SecondFactorVettedEmailProcessor.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Processor/SecondFactorVettedEmailProcessor.php index a64ba8b9f..b46ea302e 100644 --- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Processor/SecondFactorVettedEmailProcessor.php +++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Processor/SecondFactorVettedEmailProcessor.php @@ -19,7 +19,7 @@ namespace Surfnet\StepupMiddleware\CommandHandlingBundle\Processor; use Broadway\Processor\Processor; -use Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent; +use Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent; use Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent; use Surfnet\StepupMiddleware\CommandHandlingBundle\Identity\Service\SecondFactorVettedMailService; @@ -40,7 +40,7 @@ public function handleSecondFactorVettedEvent(SecondFactorVettedEvent $event) $this->secondFactorVettedMailService->sendVettedEmail($event->preferredLocale, $event->commonName, $event->email); } - public function handleSecondFactorPossessionSkippedEvent(SecondFactorPossessionSkippedEvent $event) + public function handleSecondFactorVettedPossessionSkippedEvent(SecondFactorVettedPossessionSkippedEvent $event) { $this->secondFactorVettedMailService->sendVettedEmail($event->preferredLocale, $event->commonName, $event->email); } diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php index 121649f0c..f3047ce5f 100644 --- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php +++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/IdentityCommandHandlerTest.php @@ -38,7 +38,7 @@ use Surfnet\Stepup\Identity\Event\IdentityRenamedEvent; use Surfnet\Stepup\Identity\Event\LocalePreferenceExpressedEvent; use Surfnet\Stepup\Identity\Event\PhonePossessionProvenEvent; -use Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent; +use Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent; use Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent; use Surfnet\Stepup\Identity\Event\U2fDevicePossessionProvenEvent; use Surfnet\Stepup\Identity\Event\YubikeyPossessionProvenEvent; @@ -1544,7 +1544,7 @@ public function a_second_factor_can_be_vetted_without_a_physical_proven_possessi ]) ->when($command) ->then([ - new SecondFactorPossessionSkippedEvent( + new SecondFactorVettedPossessionSkippedEvent( $registrantId, $registrantNameId, $registrantInstitution, diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/SecondFactorRevocationTest.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/SecondFactorRevocationTest.php index 9381be40e..6bc8abe59 100644 --- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/SecondFactorRevocationTest.php +++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Tests/Identity/CommandHandler/SecondFactorRevocationTest.php @@ -32,7 +32,7 @@ use Surfnet\Stepup\Identity\Event\CompliedWithVettedSecondFactorRevocationEvent; use Surfnet\Stepup\Identity\Event\EmailVerifiedEvent; use Surfnet\Stepup\Identity\Event\IdentityCreatedEvent; -use Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent; +use Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent; use Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent; use Surfnet\Stepup\Identity\Event\U2fDevicePossessionProvenEvent; use Surfnet\Stepup\Identity\Event\UnverifiedSecondFactorRevokedEvent; @@ -688,7 +688,7 @@ public function a_registration_authority_can_revoke_a_possession_proved_skipped_ $registrantEmail, new Locale('en_GB') ), - new SecondFactorPossessionSkippedEvent( + new SecondFactorVettedPossessionSkippedEvent( $registrantId, $registrantNameId, $registrantInstitution, diff --git a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php index 401261d69..4d1b18779 100644 --- a/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php +++ b/src/Surfnet/StepupMiddleware/GatewayBundle/Projector/SecondFactorProjector.php @@ -22,7 +22,7 @@ use Surfnet\Stepup\Identity\Event\CompliedWithVettedSecondFactorRevocationEvent; use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent; use Surfnet\Stepup\Identity\Event\LocalePreferenceExpressedEvent; -use Surfnet\Stepup\Identity\Event\SecondFactorPossessionSkippedEvent; +use Surfnet\Stepup\Identity\Event\SecondFactorVettedPossessionSkippedEvent; use Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent; use Surfnet\Stepup\Identity\Event\VettedSecondFactorRevokedEvent; use Surfnet\Stepup\Identity\Event\YubikeySecondFactorBootstrappedEvent; @@ -75,7 +75,7 @@ public function applySecondFactorVettedEvent(SecondFactorVettedEvent $event) ); } - public function applySecondFactorPossessionSkippedEvent(SecondFactorVettedEvent $event) + public function applySecondFactorVettedPossessionSkippedEvent(SecondFactorVettedPossessionSkippedEvent $event) { $this->repository->save( new SecondFactor(