Skip to content

Commit

Permalink
Fixed 1.0a support in AndySmithOAuthHander.
Browse files Browse the repository at this point in the history
git-svn-id: http://google-api-adwords-php.googlecode.com/svn/trunk@193 bd846e36-b2c2-11de-ae6a-cd50274c347e
  • Loading branch information
eric.koleda@google.com authored and aminin committed Jul 21, 2011
1 parent 236e908 commit 4134cd1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Google/Api/Ads/Common/Util/AndySmithOAuthHandler.php
Expand Up @@ -60,9 +60,8 @@ public function GetRequestToken($credentials, $scope, $server = NULL,
$consumer = new OAuthConsumer($credentials['oauth_consumer_key'],
$credentials['oauth_consumer_secret']);
$signatureMethod = new OAuthSignatureMethod_HMAC_SHA1();
$params['version'] = '1.0a';

$params = array('scope' => $scope);
$params = array('oauth_version' => '1.0a', 'scope' => $scope);
if (isset($applicationName)) {
$params['xoauth_displayname'] = $applicationName;
}
Expand Down Expand Up @@ -93,9 +92,8 @@ public function GetAccessToken($credentials, $verifier, $server = NULL) {
$token = new OAuthToken($credentials['oauth_token'],
$credentials['oauth_token_secret']);
$signatureMethod = new OAuthSignatureMethod_HMAC_SHA1();
$params['version'] = '1.0a';

$params = array('oauth_verifier' => $verifier);
$params = array('oauth_version' => '1.0a', 'oauth_verifier' => $verifier);
$endpoint = $this->GetAccessEndpoint($server);

$request = OAuthRequest::from_consumer_and_token($consumer, $token, 'GET',
Expand All @@ -118,10 +116,10 @@ public function GetSignedRequestParameters($credentials, $url) {
$token = new OAuthToken($credentials['oauth_token'],
$credentials['oauth_token_secret']);
$signatureMethod = new OAuthSignatureMethod_HMAC_SHA1();
$params['version'] = '1.0a';

$params = array('oauth_version' => '1.0a');
$request = OAuthRequest::from_consumer_and_token($consumer, $token, 'POST',
$url, array());
$url, $params);
$request->sign_request($signatureMethod, $consumer, $token);
return $request->get_parameters();
}
Expand Down

0 comments on commit 4134cd1

Please sign in to comment.