1 | <?php |
||
27 | final class ClaimChecker implements Source |
||
28 | { |
||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | public function name(): string |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | public function load(array $configs, ContainerBuilder $container) |
||
41 | { |
||
42 | foreach ($configs[$this->name()] as $name => $itemConfig) { |
||
43 | $service_id = sprintf('jose.claim_checker.%s', $name); |
||
44 | $definition = new Definition(JWSVerifierService::class); |
||
45 | $definition |
||
46 | ->setFactory([new Reference(ClaimCheckerManagerFactory::class), 'create']) |
||
47 | ->setArguments([ |
||
48 | $itemConfig['claims'], |
||
49 | ]) |
||
50 | ->setPublic($itemConfig['is_public']); |
||
51 | |||
52 | $container->setDefinition($service_id, $definition); |
||
53 | } |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function getNodeDefinition(ArrayNodeDefinition $node) |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function prepend(ContainerBuilder $container, array $config): ?array |
||
89 | } |
||
90 |