DownloadedJWKSet::addConfiguration()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 1
eloc 10
nc 1
nop 1
1
<?php
2
3
/*
4
 * The MIT License (MIT)
5
 *
6
 * Copyright (c) 2014-2016 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 SpomkyLabs\JoseBundle\DependencyInjection\Source\JWKSetSource;
13
14
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
15
16
abstract class DownloadedJWKSet extends AbstractJWKSetSource
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function addConfiguration(NodeDefinition $node)
22
    {
23
        parent::addConfiguration($node);
24
        $node
25
            ->children()
26
                ->scalarNode('url')->isRequired()->end()
27
                ->booleanNode('is_secured')->defaultTrue()->end()
28
                ->booleanNode('is_https')->defaultTrue()->end()
29
                ->scalarNode('cache')->defaultNull()->end()
30
                ->integerNode('cache_ttl')->defaultValue(86400)->end()
31
            ->end();
32
    }
33
}
34