Conditions | 3 |
Paths | 3 |
Total Lines | 29 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function process(ContainerBuilder $container) |
||
26 | { |
||
27 | if (!$container->hasDefinition('oauth2_server_userinfo_pipe')) { |
||
28 | return; |
||
29 | } |
||
30 | |||
31 | $path = $container->getParameter('oauth2_server.openid_connect.userinfo_endpoint.path'); |
||
32 | $route_loader = $container->getDefinition('oauth2_server.route_loader'); |
||
33 | $route_loader->addMethodCall('addRoute', [ |
||
34 | 'openid_connect_userinfo_endpoint', |
||
35 | 'oauth2_server_userinfo_pipe', |
||
36 | 'dispatch', |
||
37 | $path, // path |
||
38 | [], // defaults |
||
39 | [], // requirements |
||
40 | [], // options |
||
41 | '', // host |
||
42 | ['https'], // schemes |
||
43 | ['GET', 'POST'], // methods |
||
44 | '', // condition |
||
45 | ]); |
||
46 | |||
47 | if (!$container->hasDefinition(MetadataBuilder::class)) { |
||
48 | return; |
||
49 | } |
||
50 | |||
51 | $definition = $container->getDefinition(MetadataBuilder::class); |
||
52 | $definition->addMethodCall('addRoute', ['userinfo_endpoint', 'oauth2_server_openid_connect_userinfo_endpoint']); |
||
53 | } |
||
54 | } |
||
55 |