getUserProvider example



    private function createAuthenticationListeners(ContainerBuilder $container, string $id, array $firewall, array &$authenticationProviders, ?string $defaultProvider, array $providerIds, ?string $defaultEntryPoint): array
    {
        $listeners = [];
        $entryPoints = [];

        foreach ($this->getSortedFactories() as $factory) {
            $key = str_replace('-', '_', $factory->getKey());

            if (isset($firewall[$key])) {
                $userProvider = $this->getUserProvider($container$id$firewall$key$defaultProvider$providerIds);

                if (!$factory instanceof AuthenticatorFactoryInterface) {
                    throw new InvalidConfigurationException(sprintf('Authenticator factory "%s" ("%s") must implement "%s".', get_debug_type($factory)$key, AuthenticatorFactoryInterface::class));
                }

                if (null === $userProvider && !$factory instanceof StatelessAuthenticatorFactoryInterface) {
                    $userProvider = $this->createMissingUserProvider($container$id$key);
                }

                $authenticators = $factory->createAuthenticator($container$id$firewall[$key]$userProvider);
                if (\is_array($authenticators)) {
                    
Home | Imprint | This part of the site doesn't use cookies.