Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
pablothedude committed Jul 23, 2020
1 parent 127e07a commit b2f6231
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion config/packages/events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/personal-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Surfnet/Stepup/Identity/Entity/VerifiedSecondFactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Surfnet/Stepup/Identity/Identity.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -75,7 +75,7 @@ public function applySecondFactorVettedEvent(SecondFactorVettedEvent $event)
);
}

public function applySecondFactorPossessionSkippedEvent(SecondFactorVettedEvent $event)
public function applySecondFactorVettedPossessionSkippedEvent(SecondFactorVettedPossessionSkippedEvent $event)
{
$this->repository->save(
new SecondFactor(
Expand Down

0 comments on commit b2f6231

Please sign in to comment.