| 1 | <?php |
||
| 20 | class JWK extends AbstractSource implements JWKSourceInterface |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * {@inheritdoc} |
||
| 24 | */ |
||
| 25 | public function createDefinition(ContainerBuilder $container, array $config) |
||
| 26 | { |
||
| 27 | $definition = new Definition('Jose\Object\JWK'); |
||
| 28 | $definition->setFactory([ |
||
| 29 | new Reference('jose.factory.jwk'), |
||
| 30 | 'createFromValues', |
||
| 31 | ]); |
||
| 32 | $definition->setArguments([ |
||
| 33 | json_decode($config['value'], true), |
||
| 34 | ]); |
||
| 35 | |||
| 36 | return $definition; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | public function getKey() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | public function addConfiguration(NodeDefinition $node) |
||
| 58 | } |
||
| 59 |