]> Raphaël G. Git Repositories - userbundle/commitdiff
Add firewall name extra argument
authorRaphaël Gertz <git@rapsys.eu>
Wed, 2 Dec 2026 23:44:22 +0000 (00:44 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Wed, 2 Dec 2026 23:44:22 +0000 (00:44 +0100)
Handler/AuthenticationFailureHandler.php
config/packages/rapsysuser.yaml

index 14d4dec4a28494cbdc7b97c39bc884be49180610..6694043b036c5d640a4102550ccab95d5ce1f52e 100644 (file)
@@ -72,6 +72,7 @@ class AuthenticationFailureHandler extends DefaultAuthenticationFailureHandler {
         * @param HttpUtils $httpUtils The http utils
         * @param array $options The options
         * @param LoggerInterface $logger The logger instance
         * @param HttpUtils $httpUtils The http utils
         * @param array $options The options
         * @param LoggerInterface $logger The logger instance
+        * @param ?string $firewallName The firewall name
         * @param ContainerInterface $container The container instance
         * @param ManagerRegistry $doctrine The doctrine instance
         * @param MailerInterface $mailer The mailer instance
         * @param ContainerInterface $container The container instance
         * @param ManagerRegistry $doctrine The doctrine instance
         * @param MailerInterface $mailer The mailer instance
@@ -80,9 +81,9 @@ class AuthenticationFailureHandler extends DefaultAuthenticationFailureHandler {
         * @param RequestStack $stack The stack instance
         * @param TranslatorInterface $translator The translator instance
         */
         * @param RequestStack $stack The stack instance
         * @param TranslatorInterface $translator The translator instance
         */
-       public function __construct(protected HttpKernelInterface $httpKernel, protected HttpUtils $httpUtils, protected array $options, protected ?LoggerInterface $logger, protected ContainerInterface $container, protected ManagerRegistry $doctrine, protected MailerInterface $mailer, protected RouterInterface $router, protected SluggerUtil $slugger, protected RequestStack $stack, protected TranslatorInterface $translator) {
+       public function __construct(protected HttpKernelInterface $httpKernel, protected HttpUtils $httpUtils, protected array $options, protected ?LoggerInterface $logger, private readonly ?string $firewallName, protected ContainerInterface $container, protected ManagerRegistry $doctrine, protected MailerInterface $mailer, protected RouterInterface $router, protected SluggerUtil $slugger, protected RequestStack $stack, protected TranslatorInterface $translator) {
                //Call parent constructor
                //Call parent constructor
-               parent::__construct($httpKernel, $httpUtils, $options, $logger);
+               parent::__construct($httpKernel, $httpUtils, $options, $logger, $firewallName);
 
                //Set config
                $this->config = $container->getParameter($this->alias = RapsysUserBundle::getAlias());
 
                //Set config
                $this->config = $container->getParameter($this->alias = RapsysUserBundle::getAlias());
index a58cb82e599bdb61bc823bf0672d203c05e2d929..7ab2d06c5329219b0c3802224421b6980a9dabed 100644 (file)
@@ -39,7 +39,7 @@ services:
     #Register Authentication failure handler
     security.authentication.failure_handler:
         class: 'Rapsys\UserBundle\Handler\AuthenticationFailureHandler'
     #Register Authentication failure handler
     security.authentication.failure_handler:
         class: 'Rapsys\UserBundle\Handler\AuthenticationFailureHandler'
-        arguments: [ '@http_kernel', '@security.http_utils', {}, '@logger', '@service_container', '@doctrine', '@mailer.mailer', '@router', '@rapsyspack.slugger_util', '@request_stack', '@translator' ]
+        arguments: [ '@http_kernel', '@security.http_utils', {}, '@logger', 'main', '@service_container', '@doctrine', '@mailer.mailer', '@router', '@rapsyspack.slugger_util', '@request_stack', '@translator' ]
     #Register default logout listener
     security.logout.listener.default:
         class: 'Rapsys\UserBundle\Listener\LogoutListener'
     #Register default logout listener
     security.logout.listener.default:
         class: 'Rapsys\UserBundle\Listener\LogoutListener'