示例#1
0
 /**
  * Application Turn-Key.
  *
  * @notes  Application Turn-key
  *         A destination requested before authenticating relays
  *         user to desired URL/destination (this by-passes Panel).
  *
  *         Sometimes a user has requested a destination before
  *         authenticating on the system.  This checks to see if
  *         a destination was set and will relay to the URL once
  *         authentication has been completed.
  *
  *         To use prior to authenticating, assign the full
  *         application URL to $session->setPassport('destination_relay').
  *         Once authenticated, the /Login/index.php will relay
  *         to the destination.
  *
  * @return bool
  */
 public function runApplicationTurnKey() : bool
 {
     $session = ServiceRequestContainer::perform()->Session;
     if (!ServiceRequestContainer::perform()->Passport->has('token')) {
         $session->setPassport('destination_relay', $this->getProperty('relRootApp'));
         $this->requestRoute($this->getProperty('redirectLogout') . '/php-token-missing/');
     } else {
         $this->turnKeyValidate($session, $this->dbh->isSessionTokenAvailable($session->getPassport('token'))->getRecords());
     }
     return true;
 }