/** * Validates the code, which was entered by the user * * @param TwoFactorInterface2 $user * @param string $code * @return bool */ public function checkCode(TwoFactorInterface $user, $code) { $result = $this->authenicator->AuthenticateREST($user->getUsername(), $code); $this->result = $this->authenicator->result; return $result; }