Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 98c1344ac1f1b633dc1a0b5d5f36f0ff83fa0d09 1 parent 473edc3
@mtdowling mtdowling authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 Plugin/OauthPlugin.php
View
6 Plugin/OauthPlugin.php
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.