Beispiel #1
0
 /**
  * @param \RainLoop\Account $oAccount
  *
  * @return void
  */
 public function SetAuthToken($oAccount)
 {
     if ($oAccount) {
         $sSpecAuthToken = '_' . $oAccount->GetAuthToken();
         $this->SetSpecAuthToken($sSpecAuthToken);
         \RainLoop\Utils::SetCookie(self::AUTH_SPEC_TOKEN_KEY, $sSpecAuthToken, 0, '/', null, null, true);
         if ($oAccount->SignMe() && 0 < \strlen($oAccount->SignMeToken())) {
             \RainLoop\Utils::SetCookie(self::AUTH_SIGN_ME_TOKEN_KEY, $oAccount->SignMeToken(), \time() + 60 * 60 * 24 * 30, '/', null, null, true);
             $this->StorageProvider()->Put(null, \RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY, \RainLoop\KeyPathHelper::SignMeUserToken($oAccount->SignMeToken()), $oAccount->GetAuthToken());
         }
     }
 }