| 1 | <?php |
||
| 19 | final class JWKSets extends AbstractJWKSetSource |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | */ |
||
| 24 | public function createDefinition(ContainerBuilder $container, array $config) |
||
| 25 | { |
||
| 26 | $definition = new Definition('Jose\Object\JWKSet'); |
||
| 27 | $definition->setFactory([ |
||
| 28 | new Reference('jose.factory.jwk'), |
||
| 29 | 'createKeySets', |
||
| 30 | ]); |
||
| 31 | foreach ($config['id'] as $key_set_id) { |
||
| 32 | $ref = new Reference($key_set_id); |
||
| 33 | $definition->addMethodCall('addKeySet', [$ref]); |
||
| 34 | } |
||
| 35 | |||
| 36 | return $definition; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | public function getKeySet() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | public function addConfiguration(NodeDefinition $node) |
||
| 61 | } |
||
| 62 |