Commit 02518af3 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

UserContextFactory : Ajout d'un commentaire à propos de l'injection de...

UserContextFactory : Ajout d'un commentaire à propos de l'injection de l'identity provider dans le service UserContext.
parent 318a5767
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -19,6 +19,16 @@ class UserContextFactory
        $service = new UserContext();
        $service->setAuthenticationService($authenticationService);

        //
        // NB: il serait souhaitable d'injecter l'identity provider dans le service UserContext en faisant :
        //
        //    $identityProvider = $container->get('BjyAuthorize\Provider\Identity\ProviderInterface');
        //    $service->setIdentityProvider($identityProvider);
        //
        // mais c'est impossible pour l'instant car il y a un cycle dans les dépendances entre services qui
        // provoque une boucle infinie.
        //

        return $service;
    }
}
 No newline at end of file