-
Notifications
You must be signed in to change notification settings - Fork 493
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
Adding access_token validation for RS256 id_token's #709
Conversation
737b28c
to
45b35d0
Compare
45b35d0
to
79d797e
Compare
@@ -5,11 +5,11 @@ function buildResponse(error, description) { | |||
}; | |||
} | |||
|
|||
function invalidJwt(description) { | |||
function invalidToken(description) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be considered a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope. not a public method. just used internally.
@@ -307,6 +317,75 @@ describe('auth0.WebAuth', function() { | |||
} | |||
); // eslint-disable-line | |||
}); | |||
it('should return the id_token payload when there is no access_token', function(done) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't the payload also be returned when there's a VALID access token? That's the missing test case IMO, even if it's 95% similar to this
test/web-auth/web-auth.test.js
Outdated
} | ||
); // eslint-disable-line | ||
}); | ||
it('should return the id_token payload when there is an access_token', function(done) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when there is a valid access_token
} | ||
); // eslint-disable-line | ||
}); | ||
it('should validate an access_token when available', function(done) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if you are using the same convention somewhere, but I'd say:
should throw a token validation error when the access_token is available but not valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.