Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authenticating consumer no longer requires options to be passed, all… #470

Merged

Conversation

srcnix
Copy link
Contributor

@srcnix srcnix commented Oct 7, 2017

Previously, authenticateToken() did not work when needing to validate consumer due to not passing options.

As options are not required, don't make them required.

@codecov
Copy link

codecov bot commented Oct 7, 2017

Codecov Report

Merging #470 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #470   +/-   ##
=======================================
  Coverage   91.35%   91.35%           
=======================================
  Files         213      213           
  Lines        9174     9174           
=======================================
  Hits         8381     8381           
  Misses        793      793
Impacted Files Coverage Δ
lib/services/auth.js 91.42% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e582d96...63b9677. Read the comment docs.

@@ -106,6 +106,7 @@ s.authorizeCredential = function (id, authType, scopes) {
};

s.validateConsumer = function (id, options) {
options = options || {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can probably do function(id, options = {})

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Need to remember this! Shall update now and push.

Copy link
Contributor

@DrMegavolt DrMegavolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@XVincentX XVincentX merged commit f3a8e71 into ExpressGateway:master Oct 16, 2017
gatherchou pushed a commit to yilu-tech/express-gateway that referenced this pull request Jul 29, 2021
…ons_default

Authenticating consumer no longer requires options to be passed, all…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants