|
@@ 78-92 (lines=15) @@
|
| 75 |
|
* @param \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $node |
| 76 |
|
* @param \SpomkyLabs\JoseBundle\DependencyInjection\JWKSource\JWKSourceInterface[] $jwk_sources |
| 77 |
|
*/ |
| 78 |
|
private function addJWKSourcesSection(ArrayNodeDefinition $node, array $jwk_sources) |
| 79 |
|
{ |
| 80 |
|
$sourceNodeBuilder = $node |
| 81 |
|
->fixXmlConfig('source') |
| 82 |
|
->children() |
| 83 |
|
->arrayNode('keys') |
| 84 |
|
->useAttributeAsKey('name') |
| 85 |
|
->prototype('array') |
| 86 |
|
->performNoDeepMerging() |
| 87 |
|
->children(); |
| 88 |
|
foreach ($jwk_sources as $name => $source) { |
| 89 |
|
$sourceNode = $sourceNodeBuilder->arrayNode($name)->canBeUnset(); |
| 90 |
|
$source->addConfiguration($sourceNode); |
| 91 |
|
} |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
/** |
| 95 |
|
* @param \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $node |
|
@@ 98-112 (lines=15) @@
|
| 95 |
|
* @param \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $node |
| 96 |
|
* @param \SpomkyLabs\JoseBundle\DependencyInjection\JWKSetSource\JWKSetSourceInterface[] $jwk_set_sources |
| 97 |
|
*/ |
| 98 |
|
private function addJWKSetSourcesSection(ArrayNodeDefinition $node, array $jwk_set_sources) |
| 99 |
|
{ |
| 100 |
|
$sourceNodeBuilder = $node |
| 101 |
|
->fixXmlConfig('source') |
| 102 |
|
->children() |
| 103 |
|
->arrayNode('key_sets') |
| 104 |
|
->useAttributeAsKey('name') |
| 105 |
|
->prototype('array') |
| 106 |
|
->performNoDeepMerging() |
| 107 |
|
->children(); |
| 108 |
|
foreach ($jwk_set_sources as $name => $source) { |
| 109 |
|
$sourceNode = $sourceNodeBuilder->arrayNode($name)->canBeUnset(); |
| 110 |
|
$source->addConfiguration($sourceNode); |
| 111 |
|
} |
| 112 |
|
} |
| 113 |
|
} |
| 114 |
|
|