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

Force verification of "iss" and "aud" claims #82

Merged
merged 1 commit into from
Jun 2, 2015

Conversation

lwe
Copy link
Contributor

@lwe lwe commented Jun 2, 2015

Previously when the following options have been provided

   verify_iss: true, 'iss' => 'acme.org'

and the "iss" claim was missing in the payload - no verification was executed. The same was true for "aud". This commit changes the behaviour, so when

   verify_iss: true, 'iss' => 'acme.org'

is set - then the payload is expected to have the "iss" claim and verification will fail if missing. However, ensure to set verify_iss to true, otherwise the verification is not enabled.

This change is backwards compatible, however it might break an app here or there, because previously the verification did not happen as expected.

In addition: fixed related test cases and added new ones to ensure to cover all variants.

PS: This fixes #81

Previously when the following options have been provided

   verify_iss: true, 'iss' => 'acme.org'

and the "iss" claim was missing in the payload - no verification was
executed. The same was true for "aud".

This commit changes the behaviour, so when

   verify_iss: true, 'iss' => 'acme.org'

is set - then the payload is expected to have the "iss" claim and
verification will fail if missing. However, ensure to set `verify_iss`
to `true`, otherwise the verification is not enabled.

This change is backwards compatible, however it might break an app
here or there, because previously the verification did not happen
as expected.

In addition: fixed related test cases and added new ones to ensure
to cover all variants.
@excpt excpt merged commit 04cc6a8 into jwt:master Jun 2, 2015
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.

Shouldn't verification of additional claims, like iss, aud etc. be enforced when in options?
2 participants