Skip to content

Commit 08bc901

Browse files
authored
Clarify sign docstring to allow for dict payload
Since a `payload` of a Mapping type is converted to a string in `_encode_payload`, this commit updates the docstring for `sign` to reflect that
1 parent e31416a commit 08bc901

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jose/jws.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def sign(payload, key, headers=None, algorithm=ALGORITHMS.HS256):
2020
"""Signs a claims set and returns a JWS string.
2121
2222
Args:
23-
payload (str): A string to sign
23+
payload (str or dict): A string to sign
2424
key (str or dict): The key to use for signing the claim set. Can be
2525
individual JWK or JWK set.
2626
headers (dict, optional): A set of headers that will be added to

0 commit comments

Comments
 (0)