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

make sure :sub check behaves like :aud check #103

Merged
merged 1 commit into from
Sep 17, 2015
Merged

Conversation

skippy
Copy link
Contributor

@skippy skippy commented Sep 17, 2015

if :verify_sub is turned on and options includes a :sub, make sure we
fail if the payload is not set or doesn't match. Previously if the
payload did not have 'sub' set, it would not verify, even if verify_sub
was true

see #102

if :verify_sub is turned on and options includes a :sub, make sure we
fail if the payload is not set or doesn't match.  Previously if the
payload did not have 'sub' set, it would not verify, even if verify_sub
was true
@skippy
Copy link
Contributor Author

skippy commented Sep 17, 2015

I was tempted to also add a check where if :verify_sub is set but options[:sub] is not set, that an error would be thrown. That may change the behavior a bit too much, esp. for the scope of this bug.

But in general, if :verify is set, I would expect it to fail if :sub or :aud is not passed in. If you would like me to, I can open another issue to track that edge case.

thanks!

excpt added a commit that referenced this pull request Sep 17, 2015
make sure :sub check behaves like :aud check
@excpt excpt merged commit c9cce67 into jwt:master Sep 17, 2015
@excpt excpt added this to the Version 2.0.0 milestone Sep 17, 2015
@anakinj anakinj removed this from the Version 3.0.0 milestone Feb 2, 2023
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