Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update jwt.py
  • Loading branch information
erny authored Nov 28, 2020
commit 127b1355c1fc42b72c7f19d906285797b830157b
11 changes: 9 additions & 2 deletions jose/jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,15 @@ def decode(token, key, algorithms=None, options=None, audience=None,

Args:
token (str): A signed JWS to be verified.
key (str or dict): A key to attempt to verify the payload with. Can be
individual JWK or JWK set.
key (str or iterable): A key to attempt to verify the payload with.
This can be simple string with an individual key (e.g. "a1234"),
a tuple or list of keys (e.g. ("a1234...", "b3579"),
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tuple example appears to be missing a closing parenthesis. Consider ensuring that all examples have matching opening and closing parentheses for clarity.

Copilot uses AI. Check for mistakes.
a JSON string, (e.g. '["a1234", "b3579"]'),
a dict with the 'keys' key that gives a tuple or list of keys (e.g {'keys': [...]} ) or
a dict or JSON string as defined by RFC 7517 (e.g.
{'keys': [{'kty': 'oct', 'k': 'YTEyMzQ'}, {'kty': 'oct', 'k':'YjM1Nzk'}]} or
'{"keys": [{"kty":"oct","k":"YTEyMzQ"},{"kty":"oct","k":"YjM1Nzk"}]}'
) in which case the keys must be base64 url safe encoded (with optional padding).
algorithms (str or list): Valid algorithms that should be used to verify the JWS.
audience (str): The intended audience of the token. If the "aud" claim is
included in the claim set, then the audience must be included and must equal
Expand Down