Skip to content

Commit 0b39cd5

Browse files
eugenejoPeter Slump
authored andcommitted
Prevent multiple values for keyword argument 'audience' in jwt.decode() (#8)
* Prevent multiple values for keyword argument 'audience' in jwt.decode() * Replace dict filtering with a call to pop() Thanks to @eugenejo and @nkoshell
1 parent 5221ee8 commit 0b39cd5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/keycloak/openid_connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def decode_token(self, token, key, algorithms=None, **kwargs):
9393
way.
9494
"""
9595
return jwt.decode(token, key,
96-
audience=kwargs.get('audience') or self._client_id,
96+
audience=kwargs.pop('audience', None) or self._client_id,
9797
algorithms=algorithms or ['RS256'], **kwargs)
9898

9999
def logout(self, refresh_token):

0 commit comments

Comments
 (0)