Neos\Flow\Security\Authentication\AuthenticationManagerInterface::logout PHP Метод

logout() публичный Метод

Logs all active authentication tokens out
public logout ( ) : void
Результат void
    public function logout();

Usage Example

Пример #1
0
 /**
  * @param integer $step
  * @return void
  * @Flow\SkipCsrfProtection
  */
 public function indexAction($step = 0)
 {
     $this->currentStepIndex = $step;
     $this->checkRequestedStepIndex();
     $currentStep = $this->instantiateCurrentStep();
     $controller = $this;
     $callback = function (\Neos\Form\Core\Model\FinisherContext $finisherContext) use($controller, $currentStep) {
         $controller->postProcessStep($finisherContext->getFormValues(), $currentStep);
     };
     $formDefinition = $currentStep->getFormDefinition($callback);
     if ($this->currentStepIndex > 0) {
         $formDefinition->setRenderingOption('previousStepUri', $this->uriBuilder->uriFor('index', ['step' => $this->currentStepIndex - 1]));
     }
     if ($currentStep->isOptional()) {
         $formDefinition->setRenderingOption('nextStepUri', $this->uriBuilder->uriFor('index', ['step' => $this->currentStepIndex + 1]));
     }
     $totalAmountOfSteps = count($this->settings['steps']);
     if ($this->currentStepIndex === $totalAmountOfSteps - 1) {
         $formDefinition->setRenderingOption('finalStep', true);
         $this->authenticationManager->logout();
     }
     $response = new \Neos\Flow\Http\Response($this->response);
     $form = $formDefinition->bind($this->request, $response);
     try {
         $renderedForm = $form->render();
     } catch (\Neos\Setup\Exception $exception) {
         $this->addFlashMessage($exception->getMessage(), 'Exception while executing setup step', \Neos\Error\Messages\Message::SEVERITY_ERROR);
         $this->redirect('index', null, null, ['step' => $this->currentStepIndex]);
     }
     $this->view->assignMultiple(['form' => $renderedForm, 'totalAmountOfSteps' => $totalAmountOfSteps, 'currentStepNumber' => $this->currentStepIndex + 1]);
 }
All Usage Examples Of Neos\Flow\Security\Authentication\AuthenticationManagerInterface::logout