Skip to content

Commit bc72bb6

Browse files
committed
Add PyJWK to JWT encode.
1 parent 2f35d97 commit bc72bb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jwt/api_jwt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def _get_default_options() -> dict[str, bool | list[str]]:
4545
def encode(
4646
self,
4747
payload: dict[str, Any],
48-
key: AllowedPrivateKeys | str | bytes,
49-
algorithm: str | None = "HS256",
48+
key: AllowedPrivateKeys | PyJWK | str | bytes,
49+
algorithm: str | None = api_jws.DEFAULT_ALGORITHM,
5050
headers: dict[str, Any] | None = None,
5151
json_encoder: type[json.JSONEncoder] | None = None,
5252
sort_headers: bool = True,

0 commit comments

Comments
 (0)