Skip to content

Commit e40bd8e

Browse files
committed
Configure prod yubikey interface DI
1 parent 7fa7722 commit e40bd8e

File tree

8 files changed

+41
-3
lines changed

8 files changed

+41
-3
lines changed

ci/qa/phpstan-baseline.php

+25
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,31 @@
11511151
'count' => 1,
11521152
'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SelfVetMarshaller.php',
11531153
];
1154+
$ignoreErrors[] = [
1155+
'message' => '#^Access to an undefined property Surfnet\\\\StepupBundle\\\\Command\\\\SendSmsChallengeCommandInterface\\:\\:\\$country\\.$#',
1156+
'count' => 1,
1157+
'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SmsRecoveryTokenService.php',
1158+
];
1159+
$ignoreErrors[] = [
1160+
'message' => '#^Access to an undefined property Surfnet\\\\StepupBundle\\\\Command\\\\SendSmsChallengeCommandInterface\\:\\:\\$identity\\.$#',
1161+
'count' => 1,
1162+
'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SmsRecoveryTokenService.php',
1163+
];
1164+
$ignoreErrors[] = [
1165+
'message' => '#^Access to an undefined property Surfnet\\\\StepupBundle\\\\Command\\\\SendSmsChallengeCommandInterface\\:\\:\\$institution\\.$#',
1166+
'count' => 1,
1167+
'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SmsRecoveryTokenService.php',
1168+
];
1169+
$ignoreErrors[] = [
1170+
'message' => '#^Access to an undefined property Surfnet\\\\StepupBundle\\\\Command\\\\SendSmsChallengeCommandInterface\\:\\:\\$recoveryTokenId\\.$#',
1171+
'count' => 1,
1172+
'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SmsRecoveryTokenService.php',
1173+
];
1174+
$ignoreErrors[] = [
1175+
'message' => '#^Access to an undefined property Surfnet\\\\StepupBundle\\\\Command\\\\SendSmsChallengeCommandInterface\\:\\:\\$subscriber\\.$#',
1176+
'count' => 1,
1177+
'path' => __DIR__ . '/../../src/Surfnet/StepupSelfService/SelfServiceBundle/Service/SmsRecoveryTokenService.php',
1178+
];
11541179
$ignoreErrors[] = [
11551180
'message' => '#^Property Surfnet\\\\StepupMiddlewareClientBundle\\\\Identity\\\\Command\\\\ProvePhoneRecoveryTokenPossessionCommand\\:\\:\\$phoneNumber \\(string\\) does not accept string\\|null\\.$#',
11561181
'count' => 1,

config/services.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ services:
2121
$identityService: '@Surfnet\StepupSelfService\SelfServiceBundle\Service\IdentityService'
2222
$preferredLocaleProvider: '@self_service.locale.request_stack_locale_provider'
2323

24+
Surfnet\StepupBundle\Service\SmsRecoveryTokenServiceInterface:
25+
alias: 'Surfnet\StepupBundle\Service\SmsRecoveryTokenService'
26+
2427
Surfnet\StepupSelfService\SelfServiceBundle\Security\Authentication\Provider\SamlProvider:
2528
alias: surfnet_saml.saml_provider
2629

src/Surfnet/StepupSelfService/SelfServiceBundle/Command/SendRecoveryTokenSmsAuthenticationChallengeCommand.php

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
namespace Surfnet\StepupSelfService\SelfServiceBundle\Command;
2222

23+
use Surfnet\StepupBundle\Command\SendSmsChallengeCommandInterface;
2324
use Surfnet\StepupBundle\Value\PhoneNumber\InternationalPhoneNumber;
2425
use Surfnet\StepupSelfService\SelfServiceBundle\Service\SmsRecoveryTokenService;
2526

src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/RecoveryTokenController.php

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
use Surfnet\SamlBundle\Monolog\SamlAuthenticationLogger;
3030
use Surfnet\SamlBundle\SAML2\Response\Assertion\InResponseTo;
3131
use Surfnet\StepupBundle\Service\LoaResolutionService;
32-
use Surfnet\StepupBundle\Service\SmsRecoveryTokenServiceInterface;
3332
use Surfnet\StepupBundle\Value\Loa;
3433
use Surfnet\StepupMiddlewareClientBundle\Exception\NotFoundException;
3534
use Surfnet\StepupSelfService\SelfServiceBundle\Command\PromiseSafeStorePossessionCommand;

src/Surfnet/StepupSelfService/SelfServiceBundle/Controller/Registration/YubikeyController.php

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use Surfnet\StepupSelfService\SelfServiceBundle\Service\ControllerCheckerService;
2424
use Surfnet\StepupSelfService\SelfServiceBundle\Command\VerifyYubikeyOtpCommand;
2525
use Surfnet\StepupSelfService\SelfServiceBundle\Form\Type\ProveYubikeyPossessionType;
26-
use Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeySecondFactorService;
2726
use Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeySecondFactorServiceInterface;
2827
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
2928
use Symfony\Component\HttpFoundation\Request;

src/Surfnet/StepupSelfService/SelfServiceBundle/Resources/config/services.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,16 @@ services:
9696
- "@router"
9797
tags: [{ name: form.type, alias: ss_status_gssf }]
9898

99-
surfnet_stepup_self_service_self_service.service.yubikey:
99+
Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeyServiceInterface:
100100
public: false
101101
class: Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeyService
102102
arguments:
103103
- "@surfnet_stepup.guzzle.gateway_api"
104104
- "@logger"
105105

106+
surfnet_stepup_self_service_self_service.service.yubikey:
107+
alias: Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeyServiceInterface
108+
106109
surfnet_stepup_self_service_self_service.service.gsspuserattributes:
107110
class: Surfnet\StepupSelfService\SelfServiceBundle\Service\GsspUserAttributeService
108111
arguments:
@@ -285,3 +288,7 @@ services:
285288
tags:
286289
- { name : twig.extension }
287290

291+
Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeySecondFactorServiceInterface:
292+
class: Surfnet\StepupSelfService\SelfServiceBundle\Service\YubikeySecondFactorService
293+
arguments:
294+
$commandService: "@surfnet_stepup_self_service_self_service.service.command"

src/Surfnet/StepupSelfService/SelfServiceBundle/Service/YubikeySecondFactorServiceInterface.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types = 1);
4+
35
/**
46
* Copyright 2024 SURFnet bv
57
*

src/Surfnet/StepupSelfService/SelfServiceBundle/Service/YubikeyServiceInterface.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types = 1);
4+
35
/**
46
* Copyright 2024 SURFnet bv
57
*

0 commit comments

Comments
 (0)