| Conditions | 2 |
| Paths | 1 |
| Total Lines | 32 |
| Code Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function getConfigTreeBuilder() |
||
| 27 | { |
||
| 28 | $treeBuilder = new TreeBuilder(); |
||
| 29 | |||
| 30 | $treeBuilder |
||
| 31 | ->root('surfnet_stepup_middleware_middleware') |
||
| 32 | ->children() |
||
| 33 | ->scalarNode('email_verification_window') |
||
| 34 | ->info('The amount of seconds after which the email verification url/code expires') |
||
| 35 | ->defaultValue(3600) |
||
| 36 | ->validate() |
||
| 37 | ->ifTrue(function ($seconds) { |
||
| 38 | return !is_int($seconds) || $seconds < 1; |
||
| 39 | }) |
||
| 40 | ->thenInvalid( |
||
| 41 | 'The email verification window must be a positive integer' |
||
| 42 | ) |
||
| 43 | ->end() |
||
| 44 | ->end() |
||
| 45 | ->arrayNode('enabled_generic_second_factors') |
||
| 46 | ->isRequired() |
||
| 47 | ->prototype('array') |
||
| 48 | ->children() |
||
| 49 | ->scalarNode('loa') |
||
| 50 | ->isRequired() |
||
| 51 | ->info('The lao level of the Gssf') |
||
| 52 | ->end() |
||
| 53 | ->end() |
||
| 54 | ->end(); |
||
| 55 | |||
| 56 | return $treeBuilder; |
||
| 57 | } |
||
| 58 | } |
||
| 59 |