protected function getPreAuthenticatedData(Request $request)
    {
        $kernelClosure = $this->legacyKernelClosure;
        /** @var \ezpKernelHandler $legacyKernel */
        $legacyKernel = $kernelClosure();
        $logger = $this->logger;

        $legacyUser = $legacyKernel->runCallback(
            static function () use ($logger) {
                foreach (eZINI::instance()->variable('UserSettings', 'SingleSignOnHandlerArray') as $ssoHandlerName) {
                    $className = 'eZ' . $ssoHandlerName . 'SSOHandler';
                    if (!class_exists($className)) {
                        if ($logger) {
                            $logger->error("Undefined legacy SSOHandler class: $className");
                        }
                        continue;
                    }

                    $ssoHandler = new $className();
                    $ssoUser = $ssoHandler->handleSSOLogin();
                    if (!$ssoUser instanceof eZUser) {
                        continue;
                    }

                    $logger->info("Matched user using eZ legacy SSO Handler: $className");

                    return $ssoUser;
                }
            },
            false,
            false
        );

        // No matched user with legacy.
        if (!$legacyUser instanceof eZUser) {
            return ['', ''];
        }

        $user = new User(
            $this->userService->loadUser($legacyUser->attribute('contentobject_id')),
            ['ROLE_USER']
        );

        return [$user, $user->getPassword()];
    }
protected function getPreAuthenticatedData(Request $request)
    {
        $kernelClosure = $this->legacyKernelClosure;
        /** @var \ezpKernelHandler $legacyKernel */
        $legacyKernel = $kernelClosure();
        $logger = $this->logger;

        $legacyUser = $legacyKernel->runCallback(
            static function () use ($logger) {
                foreach (eZINI::instance()->variable('UserSettings', 'SingleSignOnHandlerArray') as $ssoHandlerName) {
                    $className = 'eZ' . $ssoHandlerName . 'SSOHandler';
                    if (!class_exists($className)) {
                        if ($logger) {
                            $logger->error("Undefined legacy SSOHandler class: $className");
                        }
                        continue;
                    }

                    $ssoHandler = new $className();
                    $ssoUser = $ssoHandler->handleSSOLogin();
                    if (!$ssoUser instanceof eZUser) {
                        continue;
                    }

                    $logger->info("Matched user using eZ legacy SSO Handler: $className");

                    return $ssoUser;
                }
            },
            false,
            false
        );

        // No matched user with legacy.
        if (!$legacyUser instanceof eZUser) {
            return ['', ''];
        }

        $user = new User(
            $this->userService->loadUser($legacyUser->attribute('contentobject_id')),
            ['ROLE_USER']
        );

        return [$user, $user->getPassword()];
    }
protected function getPreAuthenticatedData ( Request $ request ) { $ kernelClosure = $ this -> legacyKernelClosure ; /** @var \ezpKernelHandler $legacyKernel */ $ legacyKernel = $ kernelClosure ( ) ; $ logger = $ this -> logger ; $ legacyUser = $ legacyKernel -> runCallback ( static function ( ) use ( $ logger ) { foreach ( eZINI :: instance ( ) -> variable ( 'UserSettings' , 'SingleSignOnHandlerArray' ) as $ ssoHandlerName ) { $ className = 'eZ' . $ ssoHandlerName . 'SSOHandler' ; if ( ! class_exists ( $ className ) ) { if ( $ logger ) { $ logger -> error ( "Undefined legacy SSOHandler class: $className" ) ; } continue ; } $ ssoHandler = new $ className ( ) ; $ ssoUser = $ ssoHandler -> handleSSOLogin ( ) ; if ( ! $ ssoUser instanceof eZUser ) { continue ; } $ logger -> info ( "Matched user using eZ legacy SSO Handler: $className" ) ; return $ ssoUser ; } } , false , false ) ; // No matched user with legacy. if ( ! $ legacyUser instanceof eZUser ) { return [ '' , '' ] ; } $ user = new User ( $ this -> userService -> loadUser ( $ legacyUser -> attribute ( 'contentobject_id' ) ) , [ 'ROLE_USER' ] ) ; return [ $ user , $ user -> getPassword ( ) ] ; }
Iterates over legacy SSO handlers, and pre-authenticates a user if a handler returns one.

@param Request $request A Request instance

@return array An array composed of the user and the credentials
Iterates over legacy SSO handlers and pre - authenticates a user if a handler returns one .