Skip to content

Commit

Permalink
Merge pull request #86 from intuit/develop
Browse files Browse the repository at this point in the history
package.json changes to 3.0.0
  • Loading branch information
abisalehalliprasan authored May 13, 2020
2 parents 5ed3dd7 + cfdc9b7 commit 6baca25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"csrf": "^3.0.4",
"jsonwebtoken": "^8.3.0",
"oauth-signature": "^1.3.1",
"object-assign": "^4.1.1",
"popsicle": "10.0.1",
"query-string": "^6.12.1",
"rsa-pem-from-mod-exp": "^0.8.4",
Expand Down
14 changes: 6 additions & 8 deletions src/OAuthClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
'use strict';

const atob = require('atob');
// const oauthSignature = require('oauth-signature');
// const objectAssign = require('object-assign');
const Csrf = require('csrf');
const queryString = require('query-string');
const popsicle = require('popsicle');
Expand Down Expand Up @@ -67,7 +65,7 @@ function OAuthClient(config) {
level: 'info',
format: winston.format.combine(
winston.format.timestamp(),
winston.format.printf((info) => `${info.timestamp} ${info.level}: ${info.message}`)
winston.format.printf((info) => `${info.timestamp} ${info.level}: ${info.message}`),
),
transports: [
new winston.transports.File({
Expand Down Expand Up @@ -258,7 +256,7 @@ OAuthClient.prototype.refreshUsingToken = function refreshUsingToken(refresh_tok
this.log(
'info',
'Refresh usingToken () response is : ',
JSON.stringify(authResponse, null, 2)
JSON.stringify(authResponse, null, 2),
);
return authResponse;
})
Expand Down Expand Up @@ -340,7 +338,7 @@ OAuthClient.prototype.getUserInfo = function getUserInfo() {
this.log(
'info',
'The Get User Info () response is : ',
JSON.stringify(authResponse, null, 2)
JSON.stringify(authResponse, null, 2),
);
return authResponse;
})
Expand Down Expand Up @@ -369,15 +367,15 @@ OAuthClient.prototype.makeApiCall = function makeApiCall(params) {
Accept: AuthResponse._jsonContentType,
'User-Agent': OAuthClient.user_agent,
},
params.headers
params.headers,
)
: Object.assign(
{},
{
Authorization: `Bearer ${this.getToken().access_token}`,
Accept: AuthResponse._jsonContentType,
'User-Agent': OAuthClient.user_agent,
}
},
);

const request = {
Expand Down Expand Up @@ -474,7 +472,7 @@ OAuthClient.prototype.getKeyFromJWKsURI = function getKeyFromJWKsURI(id_token, k
this.log(
'error',
'The getKeyFromJWKsURI () threw an exception : ',
JSON.stringify(e, null, 2)
JSON.stringify(e, null, 2),
);
throw e;
});
Expand Down

0 comments on commit 6baca25

Please sign in to comment.