Spomky-Labs /
u2f-bundle
| 1 | <?php |
||
| 2 | |||
| 3 | /* |
||
| 4 | * The MIT License (MIT) |
||
| 5 | * |
||
| 6 | * Copyright (c) 2018 Spomky-Labs |
||
| 7 | * |
||
| 8 | * This software may be modified and distributed under the terms |
||
| 9 | * of the MIT license. See the LICENSE file for details. |
||
| 10 | */ |
||
| 11 | |||
| 12 | namespace U2FAuthentication\Bundle\DependencyInjection; |
||
| 13 | |||
| 14 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
||
| 15 | use Symfony\Component\Config\Definition\ConfigurationInterface; |
||
| 16 | |||
| 17 | class Configuration implements ConfigurationInterface |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * {@inheritdoc} |
||
| 21 | */ |
||
| 22 | public function getConfigTreeBuilder() |
||
| 23 | { |
||
| 24 | $treeBuilder = new TreeBuilder(); |
||
| 25 | $rootNode = $treeBuilder->root('u2f'); |
||
| 26 | |||
| 27 | $rootNode |
||
| 28 | ->addDefaultsIfNotSet() |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 29 | ->children() |
||
| 30 | ->scalarNode('application_id') |
||
| 31 | ->info('The application ID') |
||
| 32 | ->isRequired() |
||
| 33 | ->end() |
||
| 34 | ->arrayNode('issuer_certificates') |
||
| 35 | ->info('List of paths to certificate files. If set, the registered keys must have been manufactured by the issuer of the certificates') |
||
| 36 | ->treatNullLike([]) |
||
| 37 | ->treatFalseLike([]) |
||
| 38 | ->scalarPrototype()->end() |
||
| 39 | ->end() |
||
| 40 | ->end(); |
||
| 41 | |||
| 42 | return $treeBuilder; |
||
| 43 | } |
||
| 44 | } |
||
| 45 |