diff --git a/ci/qa/phpstan-baseline.php b/ci/qa/phpstan-baseline.php index 44e0b052b..9d4c920a3 100644 --- a/ci/qa/phpstan-baseline.php +++ b/ci/qa/phpstan-baseline.php @@ -1151,6 +1151,31 @@ 'count' => 1, 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SelfVetMarshaller.php', ]; +$ignoreErrors[] = [ + 'message' => '#^Access to an undefined property Surfnet\\\\StepupBundle\\\\Command\\\\SendSmsChallengeCommandInterface\\:\\:\\$country\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SmsRecoveryTokenService.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Access to an undefined property Surfnet\\\\StepupBundle\\\\Command\\\\SendSmsChallengeCommandInterface\\:\\:\\$identity\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SmsRecoveryTokenService.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Access to an undefined property Surfnet\\\\StepupBundle\\\\Command\\\\SendSmsChallengeCommandInterface\\:\\:\\$institution\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SmsRecoveryTokenService.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Access to an undefined property Surfnet\\\\StepupBundle\\\\Command\\\\SendSmsChallengeCommandInterface\\:\\:\\$recoveryTokenId\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SmsRecoveryTokenService.php', +]; +$ignoreErrors[] = [ + 'message' => '#^Access to an undefined property Surfnet\\\\StepupBundle\\\\Command\\\\SendSmsChallengeCommandInterface\\:\\:\\$subscriber\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SmsRecoveryTokenService.php', +]; $ignoreErrors[] = [ 'message' => '#^Property Surfnet\\\\StepupMiddlewareClientBundle\\\\Identity\\\\Command\\\\ProvePhoneRecoveryTokenPossessionCommand\\:\\:\\$phoneNumber \\(string\\) does not accept string\\|null\\.$#', 'count' => 1, diff --git a/config/services.yaml b/config/services.yaml index 975347fda..99b13bc51 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -21,6 +21,9 @@ services: $identityService: '@Surfnet\StepupSelfService\SelfServiceBundle\Service\IdentityService' $preferredLocaleProvider: '@self_service.locale.request_stack_locale_provider' + Surfnet\StepupBundle\Service\SmsRecoveryTokenServiceInterface: + alias: 'Surfnet\StepupBundle\Service\SmsRecoveryTokenService' + Surfnet\StepupSelfService\SelfServiceBundle\Security\Authentication\Provider\SamlProvider: alias: surfnet_saml.saml_provider diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Command/SendRecoveryTokenSmsAuthenticationChallengeCommand.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Command/SendRecoveryTokenSmsAuthenticationChallengeCommand.php index 4fb8357b3..131658ee6 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Command/SendRecoveryTokenSmsAuthenticationChallengeCommand.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Command/SendRecoveryTokenSmsAuthenticationChallengeCommand.php @@ -20,6 +20,7 @@ namespace Surfnet\StepupSelfService\SelfServiceBundle\Command; +use Surfnet\StepupBundle\Command\SendSmsChallengeCommandInterface; use Surfnet\StepupBundle\Value\PhoneNumber\InternationalPhoneNumber; use Surfnet\StepupSelfService\SelfServiceBundle\Service\SmsRecoveryTokenService; diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RecoveryTokenController.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RecoveryTokenController.php index 8b2d5d00f..42bf6c25e 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RecoveryTokenController.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RecoveryTokenController.php @@ -29,7 +29,6 @@ use Surfnet\SamlBundle\Monolog\SamlAuthenticationLogger; use Surfnet\SamlBundle\SAML2\Response\Assertion\InResponseTo; use Surfnet\StepupBundle\Service\LoaResolutionService; -use Surfnet\StepupBundle\Service\SmsRecoveryTokenServiceInterface; use Surfnet\StepupBundle\Value\Loa; use Surfnet\StepupMiddlewareClientBundle\Exception\NotFoundException; use Surfnet\StepupSelfService\SelfServiceBundle\Command\PromiseSafeStorePossessionCommand; diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/Registration/YubikeyController.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/Registration/YubikeyController.php index c53e62901..d53237747 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/Registration/YubikeyController.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/Registration/YubikeyController.php @@ -23,7 +23,6 @@ use Surfnet\StepupSelfService\SelfServiceBundle\Service\ControllerCheckerService; use Surfnet\StepupSelfService\SelfServiceBundle\Command\VerifyYubikeyOtpCommand; use Surfnet\StepupSelfService\SelfServiceBundle\Form\Type\ProveYubikeyPossessionType; -use Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeySecondFactorService; use Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeySecondFactorServiceInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/config/services.yaml b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/config/services.yaml index 79cfa30ca..f0891b2c4 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/config/services.yaml +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/config/services.yaml @@ -96,13 +96,16 @@ services: - "@router" tags: [{ name: form.type, alias: ss_status_gssf }] - surfnet_stepup_self_service_self_service.service.yubikey: + Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeyServiceInterface: public: false class: Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeyService arguments: - "@surfnet_stepup.guzzle.gateway_api" - "@logger" + surfnet_stepup_self_service_self_service.service.yubikey: + alias: Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeyServiceInterface + surfnet_stepup_self_service_self_service.service.gsspuserattributes: class: Surfnet\StepupSelfService\SelfServiceBundle\Service\GsspUserAttributeService arguments: @@ -285,3 +288,7 @@ services: tags: - { name : twig.extension } + Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeySecondFactorServiceInterface: + class: Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeySecondFactorService + arguments: + $commandService: "@surfnet_stepup_self_service_self_service.service.command" diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Service/YubikeySecondFactorServiceInterface.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Service/YubikeySecondFactorServiceInterface.php index 8b390d1c5..d8559eb3f 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Service/YubikeySecondFactorServiceInterface.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Service/YubikeySecondFactorServiceInterface.php @@ -1,5 +1,7 @@