Skip to content

Commit

Permalink
check for audience claims not being valid instead of being valid and …
Browse files Browse the repository at this point in the history
…returning
  • Loading branch information
r-springer committed Nov 24, 2017
1 parent 504f63c commit 6fa0f74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jwt/api_jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ def _validate_aud(self, payload, audience):
if isinstance(audience, string_types):
audience = [audience]

if any(aud in audience_claims for aud in audience):
return
if not any(aud in audience_claims for aud in audience):
raise InvalidAudienceError('Invalid audience')

raise InvalidAudienceError('Invalid audience')
return

def _validate_iss(self, payload, issuer):
if issuer is None:
Expand Down

0 comments on commit 6fa0f74

Please sign in to comment.