File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed
Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 4242 >>> import jwt
4343 >>> encoded = jwt.encode({"some": "payload"}, "secret", algorithm="HS256")
4444 >>> print(encoded)
45- eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 .eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg
45+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9 .eyJzb21lIjoicGF5bG9hZCJ9.Joh1R2dYzkRvDkqv3sygm5YyK8Gi4ShZqbhK2gxcs2U
4646 >>> jwt.decode(encoded, "secret", algorithms=["HS256"])
4747 {'some': 'payload'}
4848
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ API Reference
2323
2424 Verify the ``jwt `` token signature and return the token claims.
2525
26- :param str|bytes jwt: the token to be decoded
26+ :param str jwt: the token to be decoded
2727 :param str key: the key suitable for the allowed algorithm
2828
2929 :param list algorithms: allowed algorithms, e.g. ``["ES256"] ``
@@ -43,9 +43,9 @@ API Reference
4343 * ``verify_iss=False `` check that ``iss `` (issuer) claim matches ``issuer ``
4444 * ``verify_signature=True `` verify the JWT cryptographic signature
4545
46- :param iterable audience: optional, the value for ``verify_aud `` check
46+ :param Iterable audience: optional, the value for ``verify_aud `` check
4747 :param str issuer: optional, the value for ``verify_iss `` check
48- :param int| float leeway: a time margin in seconds for the expiration check
48+ :param float leeway: a time margin in seconds for the expiration check
4949 :rtype: dict
5050 :returns: the JWT claims
5151
Original file line number Diff line number Diff line change @@ -83,6 +83,10 @@ def find_version(*file_paths):
8383# If true, `todo` and `todoList` produce output, else they produce nothing.
8484todo_include_todos = False
8585
86+ # Intersphinx extension.
87+ intersphinx_mapping = {
88+ "python" : ("https://docs.python.org/3/" , None ),
89+ }
8690
8791# -- Options for HTML output ----------------------------------------------
8892
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ Example Usage
3232 >>> import jwt
3333 >>> encoded_jwt = jwt.encode({" some" : " payload" }, " secret" , algorithm = " HS256" )
3434 >>> print (encoded_jwt)
35- eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 .eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg
35+ eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9 .eyJzb21lIjoicGF5bG9hZCJ9.Joh1R2dYzkRvDkqv3sygm5YyK8Gi4ShZqbhK2gxcs2U
3636 >>> jwt.decode(encoded_jwt, " secret" , algorithms = [" HS256" ])
3737 {'some': 'payload'}
3838
You can’t perform that action at this time.
0 commit comments