From 249218ab7253950280952285afb2c1658a58933b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 12 Aug 2021 08:10:59 +0200 Subject: [PATCH] Set AuthenticationSuccessHandler and LogoutSuccessHandler as global security handlers --- Resources/config/packages/rapsys_user.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Resources/config/packages/rapsys_user.yaml b/Resources/config/packages/rapsys_user.yaml index d520961..30ade11 100644 --- a/Resources/config/packages/rapsys_user.yaml +++ b/Resources/config/packages/rapsys_user.yaml @@ -10,6 +10,13 @@ services: arguments: [ '@service_container', '@router', '@translator' ] autowire: true tags: [ 'controller.service_arguments' ] + #Register Authentication success handler + security.authentication.success_handler: + class: 'Rapsys\UserBundle\Handler\AuthenticationSuccessHandler' + arguments: [ '@router', {} ] #Register logout success handler - Rapsys\UserBundle\Handler\LogoutSuccessHandler: - arguments: [ '@service_container', '@router' ] + security.logout.success_handler: + class: 'Rapsys\UserBundle\Handler\LogoutSuccessHandler' + #XXX: second argument will be replaced there by kernel.mail.logout.target + #XXX: vendor/symfony/security-bundle/DependencyInjection/SecurityExtension.php +360 + arguments: [ '@service_container', '/', '@router' ] -- 2.41.1