|
16 | 16 | use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
17 | 17 | use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
|
18 | 18 | use Symfony\Component\Config\Definition\ConfigurationInterface;
|
| 19 | +use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy; |
19 | 20 |
|
20 | 21 | /**
|
21 | 22 | * This class contains the configuration information.
|
@@ -60,14 +61,20 @@ public function getConfigTreeBuilder()
|
60 | 61 | $rootNode
|
61 | 62 | ->children()
|
62 | 63 | ->scalarNode('access_denied_url')->defaultNull()->example('/foo/error403')->end()
|
63 |
| - ->scalarNode('session_fixation_strategy')->cannotBeEmpty()->info('strategy can be: none, migrate, invalidate')->defaultValue('migrate')->end() |
| 64 | + ->enumNode('session_fixation_strategy') |
| 65 | + ->values(array(SessionAuthenticationStrategy::NONE, SessionAuthenticationStrategy::MIGRATE, SessionAuthenticationStrategy::INVALIDATE)) |
| 66 | + ->defaultValue(SessionAuthenticationStrategy::MIGRATE) |
| 67 | + ->end() |
64 | 68 | ->booleanNode('hide_user_not_found')->defaultTrue()->end()
|
65 | 69 | ->booleanNode('always_authenticate_before_granting')->defaultFalse()->end()
|
66 | 70 | ->booleanNode('erase_credentials')->defaultTrue()->end()
|
67 | 71 | ->arrayNode('access_decision_manager')
|
68 | 72 | ->addDefaultsIfNotSet()
|
69 | 73 | ->children()
|
70 |
| - ->scalarNode('strategy')->defaultValue(AccessDecisionManager::STRATEGY_AFFIRMATIVE)->end() |
| 74 | + ->enumNode('strategy') |
| 75 | + ->values(array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, AccessDecisionManager::STRATEGY_CONSENSUS, AccessDecisionManager::STRATEGY_UNANIMOUS)) |
| 76 | + ->defaultValue(AccessDecisionManager::STRATEGY_AFFIRMATIVE) |
| 77 | + ->end() |
71 | 78 | ->booleanNode('allow_if_all_abstain')->defaultFalse()->end()
|
72 | 79 | ->booleanNode('allow_if_equal_granted_denied')->defaultTrue()->end()
|
73 | 80 | ->end()
|
|
0 commit comments