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