Skip to content

Commit

Permalink
fix request dependency - the new request version breaks compatibility…
Browse files Browse the repository at this point in the history
… with pre ECMAScript 2015

request/request#2774
  • Loading branch information
shiranyo committed Oct 1, 2017
1 parent 916f2b8 commit 718e8e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/strategies/api-strategy.js
Expand Up @@ -114,18 +114,18 @@ ApiStrategy.prototype.authenticate = function(req, options) {
} else {
logger.warn("Invalid identity_token. Proceeding with access_token only");
}
logger.debug("authentication success.");
logger.debug("authentication success");
return self.success(identityToken || null);
}).catch (function (err) {
logger.debug("authentication failed due to invalid identity token.");
logger.debug("authentication failed due to invalid identity token");
return self.fail(buildWwwAuthenticateHeader(requiredScope, ERROR.INVALID_TOKEN), 401);
});
} else {
logger.debug("authentication success: identity_token not found. Proceeding with access_token only.");
logger.debug("authentication success: identity_token not found. Proceeding with access_token only");
return self.success(identityToken || null);
}
}).catch (function (err) {
logger.debug("authentication failed due to invalid access token.");
logger.debug("authentication failed due to invalid access token");
return self.fail(buildWwwAuthenticateHeader(requiredScope, ERROR.INVALID_TOKEN), 401);
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -33,7 +33,7 @@
"jsonwebtoken": "^7.2.1",
"log4js": "^1.1.0",
"q": "^1.4.1",
"request": "^2.79.0",
"request": "2.81.0",
"rsa-pem-from-mod-exp": "^0.8.4",
"underscore": "^1.8.3"
}
Expand Down

0 comments on commit 718e8e4

Please sign in to comment.