From: Raphaƫl Gertz Date: Thu, 12 Aug 2021 06:10:59 +0000 (+0200) Subject: Set AuthenticationSuccessHandler and LogoutSuccessHandler as global security handlers X-Git-Tag: 0.2.0~61 X-Git-Url: https://git.rapsys.eu/userbundle/commitdiff_plain/249218ab7253950280952285afb2c1658a58933b Set AuthenticationSuccessHandler and LogoutSuccessHandler as global security handlers --- 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' ]