Neos\Flow\Security\Authentication\Provider\TestingProvider::setAuthenticationStatus PHP Метод

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

Set the authentication status for authentication
public setAuthenticationStatus ( integer $authenticationStatus ) : void
$authenticationStatus integer
Результат void
    public function setAuthenticationStatus($authenticationStatus)
    {
        $this->authenticationStatus = $authenticationStatus;
    }

Usage Example

 /**
  * Prepares the environment for and conducts an account authentication
  *
  * @param \Neos\Flow\Security\Account $account
  * @return void
  * @api
  */
 protected function authenticateAccount(\Neos\Flow\Security\Account $account)
 {
     $this->testingProvider->setAuthenticationStatus(\Neos\Flow\Security\Authentication\TokenInterface::AUTHENTICATION_SUCCESSFUL);
     $this->testingProvider->setAccount($account);
     $this->securityContext->clearContext();
     $requestHandler = self::$bootstrap->getActiveRequestHandler();
     $actionRequest = $this->route($requestHandler->getHttpRequest());
     $this->securityContext->setRequest($actionRequest);
     $this->authenticationManager->authenticate();
 }