Example #1
0
 private function _sGenRefreshToken($iUid, $sScope)
 {
     $token = Ko_Tool_OAuth::SGenKey();
     $aData = array('cid' => $this->_sClientId, 'token' => $token, 'uid' => $iUid, 'scope' => $sScope, 'ctime' => date('Y-m-d H:i:s'));
     $refreshtokenApi = $this->_aConf['refreshtokenApi'];
     $this->{$refreshtokenApi}->aInsert($aData);
     return $token;
 }
Example #2
0
 private function _aGetTemporaryCredentials()
 {
     $sToken = Ko_Tool_OAuth::SGenKey();
     $sSecret = Ko_Tool_OAuth::SGenKey();
     $aData = array('token' => $sToken, 'secret' => $sSecret, 'cid' => $this->_aReq['oauth_consumer_key'], 'callback' => $this->_aReq['oauth_callback'], 'ctime' => date('Y-m-d H:i:s'));
     $temptokenDao = $this->_aConf['temptoken'] . 'Dao';
     $this->{$temptokenDao}->aInsert($aData);
     return array($sToken, $sSecret);
 }