/** * @param Interfaces\AuthUser $userToAuthenticate * @return bool */ public function required(Interfaces\AuthUser $userToAuthenticate) { return !is_null($userToAuthenticate->getTwoFactorSecret()); }
/** * @param AuthUser $userToAuthenticate */ public function loginUser(AuthUser $userToAuthenticate) { $this->loggedInUserId = $userToAuthenticate->getAuthId(); $this->session->set('loggedInUserId', $this->loggedInUserId); }