Skip to content

Commit 670d9e9

Browse files
authored
Merge pull request #584 from amenophis/missing-event-dispatcher-tag
Add missing tag to inject configured event dispatcher
2 parents df74709 + 237fb6f commit 670d9e9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/symfony/src/DependencyInjection/Factory/Security/WebauthnServicesFactory.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Symfony\Component\DependencyInjection\Reference;
1111
use Webauthn\AuthenticatorAssertionResponseValidator;
1212
use Webauthn\AuthenticatorAttestationResponseValidator;
13+
use Webauthn\Bundle\DependencyInjection\Compiler\EventDispatcherSetterCompilerPass;
1314
use Webauthn\CeremonyStep\CeremonyStepManager;
1415
use Webauthn\CeremonyStep\CeremonyStepManagerFactory;
1516

@@ -56,7 +57,8 @@ public function createAuthenticatorAssertionResponseValidator(
5657
$authenticatorAssertionResponseValidatorId,
5758
new Definition(AuthenticatorAssertionResponseValidator::class)
5859
)
59-
->setArguments([null, null, null, null, null, new Reference($ceremonyStepManagerId)]);
60+
->setArguments([null, null, null, null, null, new Reference($ceremonyStepManagerId)])
61+
->addTag(EventDispatcherSetterCompilerPass::TAG);
6062

6163
return $authenticatorAssertionResponseValidatorId;
6264
}
@@ -82,7 +84,8 @@ public function createAuthenticatorAttestationResponseValidator(
8284
$authenticatorAttestationResponseValidatorId,
8385
new Definition(AuthenticatorAttestationResponseValidator::class)
8486
)
85-
->setArguments([null, null, null, null, null, new Reference($ceremonyStepManagerId)]);
87+
->setArguments([null, null, null, null, null, new Reference($ceremonyStepManagerId)])
88+
->addTag(EventDispatcherSetterCompilerPass::TAG);
8689

8790
return $authenticatorAttestationResponseValidatorId;
8891
}

src/symfony/src/DependencyInjection/WebauthnExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ private function loadCreationControllersSupport(ContainerBuilder $container, arr
244244
null,
245245
new Reference($creationCeremonyStepManagerId),
246246
]);
247+
$attestationResponseValidator->addTag(EventDispatcherSetterCompilerPass::TAG);
247248
$container->setDefinition($attestationResponseValidatorId, $attestationResponseValidator);
248249

249250
$attestationResponseControllerId = sprintf('webauthn.controller.creation.response.%s', $name);
@@ -330,6 +331,7 @@ private function loadRequestControllersSupport(ContainerBuilder $container, arra
330331
null,
331332
new Reference($requestCeremonyStepManagerId),
332333
]);
334+
$assertionResponseValidator->addTag(EventDispatcherSetterCompilerPass::TAG);
333335
$container->setDefinition($assertionResponseValidatorId, $assertionResponseValidator);
334336

335337
$assertionResponseControllerId = sprintf('webauthn.controller.request.response.%s', $name);

0 commit comments

Comments
 (0)