Prechádzať zdrojové kódy

[Security] allow custom logout handlers to be configured

Johannes M. Schmitt 14 rokov pred
rodič
commit
af696f6a65

+ 5 - 0
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php

@@ -298,6 +298,11 @@ class SecurityExtension extends Extension
 
                 $listener->addMethodCall('addHandler', array(new Reference($cookieHandlerId)));
             }
+
+            // add custom handlers
+            foreach ($this->normalizeConfig($firewall['logout'], 'handler') as $handlerId) {
+                $listener->addMethodCall('addHandler', array(new Reference($handlerId)));
+            }
         }
 
         // Authentication listeners