Skip to content

Commit 35f1980

Browse files
committed
[SecurityBundle] use session auth constants in config
1 parent 5f2b93c commit 35f1980

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

DependencyInjection/MainConfiguration.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
1616
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
1717
use Symfony\Component\Config\Definition\ConfigurationInterface;
18+
use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy;
1819

1920
/**
2021
* This class contains the configuration information.
@@ -59,7 +60,10 @@ public function getConfigTreeBuilder()
5960
$rootNode
6061
->children()
6162
->scalarNode('access_denied_url')->defaultNull()->example('/foo/error403')->end()
62-
->enumNode('session_fixation_strategy')->cannotBeEmpty()->values(array('none', 'migrate', 'invalidate'))->defaultValue('migrate')->end()
63+
->enumNode('session_fixation_strategy')
64+
->values(array(SessionAuthenticationStrategy::NONE, SessionAuthenticationStrategy::MIGRATE, SessionAuthenticationStrategy::INVALIDATE))
65+
->defaultValue(SessionAuthenticationStrategy::MIGRATE)
66+
->end()
6367
->booleanNode('hide_user_not_found')->defaultTrue()->end()
6468
->booleanNode('always_authenticate_before_granting')->defaultFalse()->end()
6569
->booleanNode('erase_credentials')->defaultTrue()->end()

0 commit comments

Comments
 (0)