| 1 | <?php | ||
| 20 | class KeyFile 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 | 'createFromKeyFile', | ||
| 31 | ]); | ||
| 32 | $definition->setArguments([ | ||
| 33 | $config['path'], | ||
| 34 | $config['password'], | ||
| 35 | $config['additional_values'], | ||
| 36 | ]); | ||
| 37 | |||
| 38 | return $definition; | ||
| 39 | } | ||
| 40 | |||
| 41 | /** | ||
| 42 |      * {@inheritdoc} | ||
| 43 | */ | ||
| 44 | public function getKey() | ||
| 48 | |||
| 49 | /** | ||
| 50 |      * {@inheritdoc} | ||
| 51 | */ | ||
| 52 | public function addConfiguration(NodeDefinition $node) | ||
| 66 | } | ||
| 67 |