From 6f034d2c80183309711c6860a4a2ac7926c3b602 Mon Sep 17 00:00:00 2001 From: ornicar Date: Tue, 9 Nov 2010 22:02:24 +0100 Subject: [PATCH] [FrameworkBundle] Make the use_forward option of FormAuthenticationListener configurable --- .../FrameworkBundle/DependencyInjection/SecurityExtension.php | 2 ++ .../Bundle/FrameworkBundle/Resources/config/security.xml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/SecurityExtension.php index 51a998b73750..f681fe03e89b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/SecurityExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/SecurityExtension.php @@ -467,6 +467,7 @@ protected function createFormLoginListener($container, $id, $config, $defaultPro $options = array( 'check_path' => '/login_check', 'login_path' => '/login', + 'use_forward' => false, 'always_use_default_target_path' => false, 'default_target_path' => '/', 'target_path_parameter' => '_target_path', @@ -481,6 +482,7 @@ protected function createFormLoginListener($container, $id, $config, $defaultPro } $container->setParameter('security.authentication.form.options', $options); $container->setParameter('security.authentication.form.login_path', $options['login_path']); + $container->setParameter('security.authentication.form.use_forward', $options['use_forward']); return array($provider, $listenerId); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/security.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/security.xml index a4c34979026f..0efcc6396c03 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/security.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/security.xml @@ -25,6 +25,7 @@ Symfony\Component\HttpKernel\Security\EntryPoint\FormAuthenticationEntryPoint /login + false Symfony\Component\HttpKernel\Security\Firewall\UsernamePasswordFormAuthenticationListener Symfony\Component\HttpKernel\Security\EntryPoint\BasicAuthenticationEntryPoint @@ -100,6 +101,7 @@ %security.authentication.form.login_path% + %security.authentication.form.use_forward%