Permalink
Browse files

[OAuth] Removing token and token_secret from required params. Only ad…

…ding to auth header if a value is set. Closes #143
  • Loading branch information...
1 parent 473edc3 commit 98c1344ac1f1b633dc1a0b5d5f36f0ff83fa0d09 @mtdowling mtdowling committed Sep 30, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 Plugin/OauthPlugin.php
View
@@ -46,7 +46,7 @@ public function __construct($config)
}
), array(
'signature_method', 'signature_callback', 'version',
- 'consumer_key', 'consumer_secret', 'token', 'token_secret'
+ 'consumer_key', 'consumer_secret'
));
}
@@ -80,7 +80,9 @@ public function onRequestBeforeSend(Event $event)
'oauth_token' => $this->config['token'],
'oauth_version' => $this->config['version'],
) as $key => $val) {
- $authString .= $key . '="' . urlencode($val) . '", ';
+ if ($val) {
+ $authString .= $key . '="' . urlencode($val) . '", ';
+ }
}
// Add Authorization header

0 comments on commit 98c1344

Please sign in to comment.