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