@@ 40-50 (lines=11) @@ | ||
37 | $secondFactorService = $this->get('surfnet_stepup_self_service_self_service.service.second_factor'); |
|
38 | $identity = $this->getIdentity(); |
|
39 | ||
40 | if (!$secondFactorService->identityHasSecondFactorOfStateWithId($identity->id, 'vetted', $secondFactorId)) { |
|
41 | $this->get('logger')->error( |
|
42 | sprintf( |
|
43 | 'Identity "%s" tried to test second factor "%s", but does not own that second factor or it is not vetted', |
|
44 | $identity->id, |
|
45 | $secondFactorId |
|
46 | ) |
|
47 | ); |
|
48 | ||
49 | throw $this->createNotFoundException(); |
|
50 | } |
|
51 | ||
52 | $loaResolutionService = $this->get('surfnet_stepup.service.loa_resolution'); |
|
53 | $authenticationRequestFactory = $this->get('self_service.test_second_factor_authentication_request_factory'); |
@@ 62-70 (lines=9) @@ | ||
59 | ||
60 | /** @var SecondFactorService $service */ |
|
61 | $service = $this->get('surfnet_stepup_self_service_self_service.service.second_factor'); |
|
62 | if (!$service->identityHasSecondFactorOfStateWithId($identity->id, $state, $secondFactorId)) { |
|
63 | $this->get('logger')->error(sprintf( |
|
64 | 'Identity "%s" tried to revoke "%s" second factor "%s", but does not own that second factor', |
|
65 | $identity->id, |
|
66 | $state, |
|
67 | $secondFactorId |
|
68 | )); |
|
69 | throw new NotFoundHttpException(); |
|
70 | } |
|
71 | ||
72 | switch ($state) { |
|
73 | case 'unverified': |