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