/** * Checks the given token for validity and sets the token authentication status * accordingly (success, if __casAuthenticationProviderName == $this->name). * * @param TokenInterface $authenticationToken The token to be authenticated * * @throws \TYPO3\Flow\Security\Exception\UnsupportedAuthenticationTokenException * * @return void */ public function authenticate(TokenInterface $authenticationToken) { if ($authenticationToken->getAuthenticationProviderName() === $this->name) { $casAttributes = $this->casManager->authenticate($this->name); if (!empty($casAttributes) && is_array($casAttributes)) { $account = $this->casManager->getAccount($this->name, $casAttributes); $authenticationToken->setAccount($account); $authenticationToken->setAuthenticationStatus(TokenInterface::AUTHENTICATION_SUCCESSFUL); } } }