|
@@ 142-156 (lines=15) @@
|
| 139 |
|
* @param \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $node |
| 140 |
|
* @param \SpomkyLabs\JoseBundle\DependencyInjection\JWKSource\JWKSourceInterface[] $jwk_sources |
| 141 |
|
*/ |
| 142 |
|
private function addJWKSourcesSection(ArrayNodeDefinition $node, array $jwk_sources) |
| 143 |
|
{ |
| 144 |
|
$sourceNodeBuilder = $node |
| 145 |
|
->fixXmlConfig('source') |
| 146 |
|
->children() |
| 147 |
|
->arrayNode('keys') |
| 148 |
|
->useAttributeAsKey('name') |
| 149 |
|
->prototype('array') |
| 150 |
|
->performNoDeepMerging() |
| 151 |
|
->children(); |
| 152 |
|
foreach ($jwk_sources as $name => $source) { |
| 153 |
|
$sourceNode = $sourceNodeBuilder->arrayNode($name)->canBeUnset(); |
| 154 |
|
$source->addConfiguration($sourceNode); |
| 155 |
|
} |
| 156 |
|
} |
| 157 |
|
|
| 158 |
|
/** |
| 159 |
|
* @param \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $node |
|
@@ 162-176 (lines=15) @@
|
| 159 |
|
* @param \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $node |
| 160 |
|
* @param \SpomkyLabs\JoseBundle\DependencyInjection\JWKSetSource\JWKSetSourceInterface[] $jwk_set_sources |
| 161 |
|
*/ |
| 162 |
|
private function addJWKSetSourcesSection(ArrayNodeDefinition $node, array $jwk_set_sources) |
| 163 |
|
{ |
| 164 |
|
$sourceNodeBuilder = $node |
| 165 |
|
->fixXmlConfig('source') |
| 166 |
|
->children() |
| 167 |
|
->arrayNode('key_sets') |
| 168 |
|
->useAttributeAsKey('name') |
| 169 |
|
->prototype('array') |
| 170 |
|
->performNoDeepMerging() |
| 171 |
|
->children(); |
| 172 |
|
foreach ($jwk_set_sources as $name => $source) { |
| 173 |
|
$sourceNode = $sourceNodeBuilder->arrayNode($name)->canBeUnset(); |
| 174 |
|
$source->addConfiguration($sourceNode); |
| 175 |
|
} |
| 176 |
|
} |
| 177 |
|
} |
| 178 |
|
|