Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update comments for key argument #103

Merged
merged 1 commit into from
Jul 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
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