Oauth 1.0a Versions Save

OAuth 1.0a Request Authorization for Node and Browser

2.2.6

4 years ago
  • update dev dependencies
  • Added types for BodyHashFunction and HashFunction
  • remove linkedin in test

2.2.5

5 years ago

Make realm optional in TS

2.2.4

6 years ago

Add Typescripts type declaration

2.2.3

6 years ago

47b8413bbe21cc69f72de3b1ba06f5dc9638c346

2.2.2

6 years ago

#58

2.2.1

6 years ago
  • Change elements iteration in #getParameterString #55

2.2.0

6 years ago
  • support realm
  • support oauth_token can be a empty string as ""

2.1.1

7 years ago
  • preserve sorted parameters

2.1.0

7 years ago

add an option to #authorize:

  • includeBodyHash: Boolean default false set to true if you want oauth_body_hash signing

2.0.0

7 years ago

change:

  • rename consumer.public to consumer.key
var oauth = OAuth({
    consumer: {
        key: '<your consumer key>',
        secret: '<your consumer secret>'
    },
});
  • remove CryptoJs dependency, make PLAINTEXT as default signature method

read more here: https://github.com/ddo/oauth-1.0a#crypto

var crypto = require('crypto');
...

var oauth = OAuth({
    consumer: {
        key: '<your consumer key>',
        secret: '<your consumer secret>'
    },
    signature_method: 'HMAC-SHA1',
    hash_function: function(base_string, key) {
        return crypto.createHmac('sha1', key).update(base_string).digest('base64');
    }
});

fix:

  • fix empty GET param