Neos.Neos/Classes/Controller/Backend/BackendController.php
public function switchSiteAction($site)
    {
        $token = Algorithms::generateRandomToken(32);
        $this->loginTokenCache->set($token, $this->currentSession->getId());
        $siteUri = $this->linkingService->createSiteUri($this->controllerContext, $site);

        $loginUri = $this->controllerContext->getUriBuilder()
            ->reset()
            ->uriFor('tokenLogin', ['token' => $token], 'Login', 'Neos.Neos');
        $this->redirectToUri($siteUri . $loginUri);
    }
public function switchSiteAction($site)
    {
        $token = Algorithms::generateRandomToken(32);
        $this->loginTokenCache->set($token, $this->currentSession->getId());
        $siteUri = $this->linkingService->createSiteUri($this->controllerContext, $site);

        $loginUri = $this->controllerContext->getUriBuilder()
            ->reset()
            ->uriFor('tokenLogin', ['token' => $token], 'Login', 'Neos.Neos');
        $this->redirectToUri($siteUri . $loginUri);
    }
public function switchSiteAction ( $ site ) { $ token = Algorithms :: generateRandomToken ( 32 ) ; $ this -> loginTokenCache -> set ( $ token , $ this -> currentSession -> getId ( ) ) ; $ siteUri = $ this -> linkingService -> createSiteUri ( $ this -> controllerContext , $ site ) ; $ loginUri = $ this -> controllerContext -> getUriBuilder ( ) -> reset ( ) -> uriFor ( 'tokenLogin' , [ 'token' => $ token ] , 'Login' , 'Neos.Neos' ) ; $ this -> redirectToUri ( $ siteUri . $ loginUri ) ; }
Redirects to the Neos backend on the given site, passing a one-time login token

@param Site $site
@return void
@throws \Neos\Cache\Exception
@throws \Neos\Cache\Exception\InvalidDataException
@throws \Neos\Flow\Mvc\Exception\StopActionException
@throws \Neos\Flow\Mvc\Exception\UnsupportedRequestTypeException
@throws \Neos\Flow\Mvc\Routing\Exception\MissingActionNameException
@throws \Neos\Flow\Session\Exception\SessionNotStartedException
@throws \Neos\Neos\Exception
Redirects to the Neos backend on the given site passing a one - time login token