Commit c3f28ea5 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Le service AuthenticationService est fourni via une LazyServiceFactory pour...

Le service AuthenticationService est fourni via une LazyServiceFactory pour tenter d'éviter les boucle dans le service container.
parent 0dac91d4
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ use UnicaenAuth\View\Helper\LdapConnectViewHelperFactory;
use UnicaenAuth\View\Helper\LocalConnectViewHelperFactory;
use UnicaenAuth\View\Helper\ShibConnectViewHelperFactory;
use UnicaenAuth\View\Helper\UserUsurpationHelperFactory;
use Zend\Authentication\AuthenticationService;
use Zend\ServiceManager\Proxy\LazyServiceFactory;

$settings = [

@@ -462,6 +464,17 @@ return [
            'UnicaenAuth\Guard\PrivilegeController'   => PrivilegeControllerFactory::class,
            'UnicaenAuth\Guard\PrivilegeRoute'        => PrivilegeRouteFactory::class,
        ],
        'lazy_services' => [
            // Mapping services to their class names is required since the ServiceManager is not a declarative DIC.
            'class_map' => [
                'zfcuser_auth_service' => AuthenticationService::class,
            ],
        ],
        'delegators' => [
            'zfcuser_auth_service' => [
                LazyServiceFactory::class,
            ],
        ],
        'shared' => [
            'MouchardCompleterAuth'        => false,
        ],