Skip to content

Commit

Permalink
Merge pull request #103 from imsteev/update_function_param_comments
Browse files Browse the repository at this point in the history
update comments for key argument
  • Loading branch information
mpdavis committed Jul 17, 2018
2 parents 6b3d557 + 0955621 commit 7ff8122
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions jose/jws.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def sign(payload, key, headers=None, algorithm=ALGORITHMS.HS256):
Args:
payload (str): A string to sign
key (str): The key to use for signing the claim set
key (str or dict): The key to use for signing the claim set. Can be
individual JWK or JWK set.
headers (dict, optional): A set of headers that will be added to
the default headers. Any headers that are added as additional
headers will override the default headers.
Expand Down Expand Up @@ -53,7 +54,8 @@ def verify(token, key, algorithms, verify=True):
Args:
token (str): A signed JWS to be verified.
key (str): A key to attempt to verify the payload with.
key (str or dict): A key to attempt to verify the payload with. Can be
individual JWK or JWK set.
algorithms (str or list): Valid algorithms that should be used to verify the JWS.
Returns:
Expand Down
6 changes: 4 additions & 2 deletions jose/jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def encode(claims, key, algorithm=ALGORITHMS.HS256, headers=None, access_token=N
Args:
claims (dict): A claims set to sign
key (str): The key to use for signing the claim set
key (str or dict): The key to use for signing the claim set. Can be
individual JWK or JWK set.
algorithm (str, optional): The algorithm to use for signing the
the claims. Defaults to HS256.
headers (dict, optional): A set of headers that will be added to
Expand Down Expand Up @@ -67,7 +68,8 @@ def decode(token, key, algorithms=None, options=None, audience=None,
Args:
token (str): A signed JWS to be verified.
key (str): A key to attempt to verify the payload with.
key (str or dict): A key to attempt to verify the payload with. Can be
individual JWK or JWK set.
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

0 comments on commit 7ff8122

Please sign in to comment.