Skip to content

Commit

Permalink
Merge pull request #1 from satinjeet/satinjeet-patch-1
Browse files Browse the repository at this point in the history
Fix some typos
  • Loading branch information
satinjeet committed Oct 13, 2015
2 parents 14c7eb5 + 60391a8 commit 780e6b3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/OAuthSimple.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,10 @@ if (OAuthSimple === undefined)
return elements.join('&');
};

self._generateSignature = function(normParams="") {

self._generateSignature = function(normParams) {
if (normParams == null) {
normParams = "";
}
var secretKey = this._oauthEscape(this._secrets.shared_secret) + '&' +
this._oauthEscape(this._secrets.oauth_secret);
if (this._parameters['oauth_signature_method'] == 'PLAINTEXT')
Expand All @@ -463,7 +465,7 @@ if (OAuthSimple === undefined)
}
if (this._parameters['oauth_signature_method'] == 'HMAC-SHA1')
{
var sigString = this._oauthEscape(this._action) + '&' + this._oauthEscape(this._path) + '&' + this.normParams);
var sigString = this._oauthEscape(this._action) + '&' + this._oauthEscape(this._path) + '&' + this.normParams;
return this.b64_hmac_sha1(secretKey, sigString);
}
return null;
Expand Down

0 comments on commit 780e6b3

Please sign in to comment.