Skip to content

Commit

Permalink
[FrameworkBundle] Make the use_forward option of FormAuthenticationLi…
Browse files Browse the repository at this point in the history
…stener configurable
  • Loading branch information
ornicar authored and fabpot committed Nov 10, 2010
1 parent 5131636 commit 6f034d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Expand Up @@ -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',
Expand All @@ -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);
}
Expand Down
Expand Up @@ -25,6 +25,7 @@

<parameter key="security.authentication.form_entry_point.class">Symfony\Component\HttpKernel\Security\EntryPoint\FormAuthenticationEntryPoint</parameter>
<parameter key="security.authentication.form.login_path">/login</parameter>
<parameter key="security.authentication.form.use_forward">false</parameter>
<parameter key="security.authentication.listener.form.class">Symfony\Component\HttpKernel\Security\Firewall\UsernamePasswordFormAuthenticationListener</parameter>

<parameter key="security.authentication.basic_entry_point.class">Symfony\Component\HttpKernel\Security\EntryPoint\BasicAuthenticationEntryPoint</parameter>
Expand Down Expand Up @@ -100,6 +101,7 @@

<service id="security.authentication.form_entry_point" class="%security.authentication.form_entry_point.class%">
<argument>%security.authentication.form.login_path%</argument>
<argument>%security.authentication.form.use_forward%</argument>
</service>

<service id="security.authentication.basic_entry_point" class="%security.authentication.basic_entry_point.class%">
Expand Down

0 comments on commit 6f034d2

Please sign in to comment.