-
-
Notifications
You must be signed in to change notification settings - Fork 688
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
Fix bug if application does not specify audience #336
Conversation
1 similar comment
@djw8605 need a bit more info on this. Did something break for you on v1.6.0? |
Hi, yes. When the application does not specify an audience, but the token does, it used to throw an
|
@djw8605 thanks! Can we update the exception string to v1.5.3
v1.6.0
|
jwt/api_jwt.py
Outdated
if audience is None and 'aud' in payload: | ||
# Application did not specify an audience, but | ||
# the token has the 'aud' claim | ||
raise InvalidAudienceError('Audience is specified in the payload, but not the application') |
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.
Update exception message to Invalid audience
so it matches previous behavior.
@@ -10,6 +10,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). | |||
|
|||
### Fixed | |||
|
|||
- Audience parameter throws `InvalidAudienceError` when application does not specify an audience, but the token does. [#336][336] |
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.
Add [336]: https://github.com/jpadilla/pyjwt/pull/336
towards the end of the file.
@jpadilla changes made. |
@djw8605 thanks! I'll try to release v1.6.1 soon. |
If the application does not specify an audience, but the token does, then throw an
InvalidAudienceError
.