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