Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function process(ContainerBuilder $container) |
||
28 | { |
||
29 | dump($container->hasDefinition(UserInfoEndpoint::class)); |
||
30 | dump($container->hasDefinition('jose.jwe_builder.oauth2_server.userinfo')); |
||
31 | if (!$container->hasDefinition(UserInfoEndpoint::class) || !$container->hasDefinition('jose.jwe_builder.oauth2_server.userinfo')) { |
||
32 | return; |
||
33 | } |
||
34 | |||
35 | $definition = $container->getDefinition(UserInfoEndpoint::class); |
||
36 | $definition->addMethodCall('enableEncryption', [new Reference('jose.jwe_builder.oauth2_server.userinfo')]); |
||
37 | |||
38 | if ($container->hasDefinition(MetadataBuilder::class)) { |
||
39 | $definition = $container->getDefinition(MetadataBuilder::class); |
||
40 | $definition->addMethodCall('addKeyValuePair', ['userinfo_encryption_alg_values_supported', $container->getParameter('oauth2_server.openid_connect.userinfo_endpoint.encryption.key_encryption_algorithms')]); |
||
41 | $definition->addMethodCall('addKeyValuePair', ['userinfo_encryption_enc_values_supported', $container->getParameter('oauth2_server.openid_connect.userinfo_endpoint.encryption.content_encryption_algorithms')]); |
||
42 | } |
||
43 | } |
||
44 | } |
||
45 |