Skip to content

Commit

Permalink
Merge pull request #584 from amenophis/missing-event-dispatcher-tag
Browse files Browse the repository at this point in the history
Add missing tag to inject configured event dispatcher
  • Loading branch information
Spomky authored Apr 2, 2024
2 parents df74709 + 237fb6f commit 670d9e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Symfony\Component\DependencyInjection\Reference;
use Webauthn\AuthenticatorAssertionResponseValidator;
use Webauthn\AuthenticatorAttestationResponseValidator;
use Webauthn\Bundle\DependencyInjection\Compiler\EventDispatcherSetterCompilerPass;
use Webauthn\CeremonyStep\CeremonyStepManager;
use Webauthn\CeremonyStep\CeremonyStepManagerFactory;

Expand Down Expand Up @@ -56,7 +57,8 @@ public function createAuthenticatorAssertionResponseValidator(
$authenticatorAssertionResponseValidatorId,
new Definition(AuthenticatorAssertionResponseValidator::class)
)
->setArguments([null, null, null, null, null, new Reference($ceremonyStepManagerId)]);
->setArguments([null, null, null, null, null, new Reference($ceremonyStepManagerId)])
->addTag(EventDispatcherSetterCompilerPass::TAG);

return $authenticatorAssertionResponseValidatorId;
}
Expand All @@ -82,7 +84,8 @@ public function createAuthenticatorAttestationResponseValidator(
$authenticatorAttestationResponseValidatorId,
new Definition(AuthenticatorAttestationResponseValidator::class)
)
->setArguments([null, null, null, null, null, new Reference($ceremonyStepManagerId)]);
->setArguments([null, null, null, null, null, new Reference($ceremonyStepManagerId)])
->addTag(EventDispatcherSetterCompilerPass::TAG);

return $authenticatorAttestationResponseValidatorId;
}
Expand Down
2 changes: 2 additions & 0 deletions src/symfony/src/DependencyInjection/WebauthnExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ private function loadCreationControllersSupport(ContainerBuilder $container, arr
null,
new Reference($creationCeremonyStepManagerId),
]);
$attestationResponseValidator->addTag(EventDispatcherSetterCompilerPass::TAG);
$container->setDefinition($attestationResponseValidatorId, $attestationResponseValidator);

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

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

0 comments on commit 670d9e9

Please sign in to comment.