Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
shiranyo committed Oct 1, 2017
1 parent 916f2b8 commit 51892b9
Showing 1 changed file with 4 additions and 4 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

0 comments on commit 51892b9

Please sign in to comment.