Пример #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;
 }
Пример #2
0
 private static function _SGetTokenUri($sMethod, $sUri, $aReq, $sSecret, $sRequestSecret)
 {
     $uri = 'GET' === $sMethod ? $sUri . '?' : '';
     foreach ($aReq as $k => $v) {
         $uri .= $k . '=' . urlencode($v) . '&';
     }
     $sSignature = Ko_Tool_OAuth::SGetSignature($sMethod, $sUri, $aReq, $sSecret, $sRequestSecret);
     return $uri . 'oauth_signature=' . urlencode($sSignature);
 }