Skip to content

Commit 9bfe6aa

Browse files
Fix 465: allow to disable authorize
1 parent 07f6471 commit 9bfe6aa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

DependencyInjection/FOSOAuthServerExtension.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,12 @@ public function load(array $configs, ContainerBuilder $container)
8585
$ormEntityManagerDefinition->setFactory([new Reference('doctrine'), 'getManager']);
8686
}
8787

88-
if (!empty($config['authorize'])) {
89-
$this->loadAuthorize($config['authorize'], $container, $loader);
88+
if (empty($config['authorize'])) {
89+
return;
9090
}
9191

92+
$this->loadAuthorize($config['authorize'], $container, $loader);
93+
9294
// Authorize form factory definition
9395
// TODO: Go back to xml configuration when bumping the requirement to Symfony >=2.6
9496
$authorizeFormDefinition = $container->getDefinition('fos_oauth_server.authorize.form');

0 commit comments

Comments
 (0)