]> Raphaël G. Git Repositories - userbundle/commitdiff
Set AuthenticationSuccessHandler and LogoutSuccessHandler as global security handlers
authorRaphaël Gertz <git@rapsys.eu>
Thu, 12 Aug 2021 06:10:59 +0000 (08:10 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Thu, 12 Aug 2021 06:10:59 +0000 (08:10 +0200)
Resources/config/packages/rapsys_user.yaml

index d5209612c94acce89b54e65f3a2d57d9563b58ba..30ade11c155566adee703dfd2f1dccdc822f1be4 100644 (file)
@@ -10,6 +10,13 @@ services:
         arguments: [ '@service_container', '@router', '@translator' ]
         autowire: true
         tags: [ 'controller.service_arguments' ]
         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
     #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' ]