| Conditions | 2 |
| Paths | 1 |
| Total Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function getConfigTreeBuilder() |
||
| 30 | { |
||
| 31 | $treeBuilder = new TreeBuilder('surfnet_stepup_u2f'); |
||
| 32 | |||
| 33 | $rootNode = $treeBuilder->getRootNode(); |
||
| 34 | $rootNode |
||
| 35 | ->children() |
||
| 36 | ->scalarNode('app_id') |
||
| 37 | ->info( |
||
| 38 | 'This is the URL that identifies this logical application and from where the Trusted Facets ' . |
||
| 39 | 'List is served' |
||
| 40 | ) |
||
| 41 | ->isRequired() |
||
| 42 | ->validate() |
||
| 43 | ->ifTrue( |
||
| 44 | function ($appId) { |
||
| 45 | return !is_string($appId) || parse_url($appId, PHP_URL_SCHEME) !== 'https'; |
||
| 46 | } |
||
| 47 | ) |
||
| 48 | ->thenInvalid('surfnet_stepup_u2f.app_id must be an HTTPS URL') |
||
| 49 | ->end() |
||
| 50 | ->end() |
||
| 51 | ->end(); |
||
| 52 | |||
| 53 | return $treeBuilder; |
||
| 54 | } |
||
| 55 | } |
||
| 56 |