Neos\Flow\Security\Authentication\Controller\AbstractAuthenticationController::logoutAction PHP 메소드

logoutAction() 공개 메소드

Logs all active tokens out. Override this, if you want to have some custom action here. You can always call the parent method to do the actual logout.
public logoutAction ( ) : void
리턴 void
    public function logoutAction()
    {
        $this->authenticationManager->logout();
    }

Usage Example

 /**
  * Logs out a - possibly - currently logged in account.
  * The possible redirection URI is queried from the redirection service
  * at first, before the actual logout takes place, and the session gets destroyed.
  *
  * @return void
  */
 public function logoutAction()
 {
     $possibleRedirectionUri = $this->backendRedirectionService->getAfterLogoutRedirectionUri($this->request);
     parent::logoutAction();
     switch ($this->request->getFormat()) {
         case 'json':
             $this->view->assign('value', array('success' => true));
             break;
         default:
             if ($possibleRedirectionUri !== null) {
                 $this->redirectToUri($possibleRedirectionUri);
             }
             $this->addFlashMessage('Successfully logged out', 'Logged out', Message::SEVERITY_NOTICE, array(), 1318421560);
             $this->redirect('index');
     }
 }