OAuth 1.0a Request Authorization for Node and Browser
Make realm optional in TS
Add Typescripts type declaration
47b8413bbe21cc69f72de3b1ba06f5dc9638c346
#58
realm
oauth_token
can be a empty string as ""
add an option to #authorize
:
Boolean
default false set to true if you want oauth_body_hash
signingchange:
consumer.public
to consumer.key
var oauth = OAuth({
consumer: {
key: '<your consumer key>',
secret: '<your consumer secret>'
},
});
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: