예제 #1
0
 /**
  * @param StartVettingProcedureCommand $command
  * @return string The procedure ID.
  */
 public function startProcedure(StartVettingProcedureCommand $command)
 {
     $this->smsSecondFactorService->clearSmsVerificationState();
     if (!$this->isLoaSufficientToStartProcedure($command)) {
         throw new LoaTooLowException(sprintf("Registration authority has LoA '%s', which is not enough to allow vetting of a '%s' second factor", $command->authorityLoa, $command->secondFactor->type));
     }
     $procedure = VettingProcedure::start($command->secondFactor->id, $command->authorityId, $command->registrationCode, $command->secondFactor);
     $this->vettingProcedureRepository->store($procedure);
     return $procedure->getId();
 }
 public function clearSmsVerificationState()
 {
     $this->smsSecondFactorService->clearSmsVerificationState();
 }