Neos\Neos\Controller\LoginController::onAuthenticationSuccess PHP Method

onAuthenticationSuccess() protected method

Is called if authentication was successful.
protected onAuthenticationSuccess ( ActionRequest $originalRequest = null ) : void
$originalRequest Neos\Flow\Mvc\ActionRequest The request that was intercepted by the security framework, NULL if there was none
return void
    protected function onAuthenticationSuccess(ActionRequest $originalRequest = null)
    {
        if ($this->view instanceof JsonView) {
            $this->view->assign('value', array('success' => $this->authenticationManager->isAuthenticated(), 'csrfToken' => $this->securityContext->getCsrfProtectionToken()));
        } else {
            if ($this->request->hasArgument('lastVisitedNode') && strlen($this->request->getArgument('lastVisitedNode')) > 0) {
                $this->session->putData('lastVisitedNode', $this->request->getArgument('lastVisitedNode'));
            }
            if ($originalRequest !== null) {
                // Redirect to the location that redirected to the login form because the user was nog logged in
                $this->redirectToRequest($originalRequest);
            }
            $this->redirect('index', 'Backend\\Backend');
        }
    }