Skip to content

Commit

Permalink
Prevent multiple values for keyword argument 'audience' in jwt.decode…
Browse files Browse the repository at this point in the history
…() (#8)

* Prevent multiple values for keyword argument 'audience' in jwt.decode()
* Replace dict filtering with a call to pop()

Thanks to @eugenejo and @nkoshell
  • Loading branch information
eugenejo authored and Peter Slump committed Nov 27, 2018
1 parent 5221ee8 commit 0b39cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/keycloak/openid_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def decode_token(self, token, key, algorithms=None, **kwargs):
way.
"""
return jwt.decode(token, key,
audience=kwargs.get('audience') or self._client_id,
audience=kwargs.pop('audience', None) or self._client_id,
algorithms=algorithms or ['RS256'], **kwargs)

def logout(self, refresh_token):
Expand Down

0 comments on commit 0b39cd5

Please sign in to comment.