Пример #1
0
 function getRefreshConsentTokenUrl($offers, $refreshtoken, $ru = null)
 {
     $_force_delauth_nonprovisioned = $this->_force_delauth_nonprovisioned;
     if (!$offers) {
         //throw new Exception('Error: getRefreshConsentTokenUrl: Invalid offers list.');
         $this->setError('Error: getRefreshConsentTokenUrl: Invalid offers list.');
         return false;
     }
     if (!$refreshtoken) {
         //throw new Exception('Error: getRefreshConsentTokenUrl: Invalid refresh token.');
         $this->setError('Error: getRefreshConsentTokenUrl: Invalid refresh token.');
         return false;
     }
     $url = WindowsLiveLogin::getConsentBaseUrl();
     $url .= 'RefreshToken.aspx?ps=' . urlencode($offers);
     $url .= '&reft=' . $refreshtoken;
     $ru = $ru ? $ru : WindowsLiveLogin::getReturnUrl();
     $url .= $ru ? '&ru=' . urlencode($ru) : '';
     if (!$this->_force_delauth_nonprovisioned) {
         $url .= '&app=' . WindowsLiveLogin::getAppVerifier();
     }
     return $url;
 }