| @@ 24-38 (lines=15) @@ | ||
| 21 | /** |
|
| 22 | * {@inheritdoc} |
|
| 23 | */ |
|
| 24 | public function create(ContainerBuilder $container, $id, array $config) |
|
| 25 | { |
|
| 26 | $definition = new Definition('Jose\Object\JWK'); |
|
| 27 | $definition->setFactory([ |
|
| 28 | new Reference('jose.factory.jwk'), |
|
| 29 | 'createFromKeyFile', |
|
| 30 | ]); |
|
| 31 | $definition->setArguments([ |
|
| 32 | $config['path'], |
|
| 33 | $config['password'], |
|
| 34 | $config['additional_values'], |
|
| 35 | ]); |
|
| 36 | ||
| 37 | $container->setDefinition($id, $definition); |
|
| 38 | } |
|
| 39 | ||
| 40 | /** |
|
| 41 | * {@inheritdoc} |
|
| @@ 269-283 (lines=15) @@ | ||
| 266 | * @param array $config |
|
| 267 | * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container |
|
| 268 | */ |
|
| 269 | private function createChecker($name, array $config, ContainerBuilder $container) |
|
| 270 | { |
|
| 271 | $service_id = sprintf('jose.checker.%s', $name); |
|
| 272 | $definition = new Definition('Jose\Checker\CheckerManager'); |
|
| 273 | $definition->setFactory([ |
|
| 274 | new Reference('jose.factory.service'), |
|
| 275 | 'createChecker', |
|
| 276 | ]); |
|
| 277 | $definition->setArguments([ |
|
| 278 | $config['claims'], |
|
| 279 | $config['headers'], |
|
| 280 | ]); |
|
| 281 | ||
| 282 | $container->setDefinition($service_id, $definition); |
|
| 283 | } |
|
| 284 | ||
| 285 | /** |
|
| 286 | * @param string $name |
|