summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLandon GB <landogbland@gmail.com>2017-07-26 16:02:52 -0600
committerJosé Padilla <jpadilla@webapplicate.com>2017-07-28 11:37:53 -0400
commit5fbc48424e603bfbf70938f581271e47ea02738d (patch)
tree2ea801ca3559a3a45dd5e39dd47807941bbe1629
parentffa8458d709a538c4e088e6ada77153ab8294800 (diff)
downloadpyjwt-5fbc48424e603bfbf70938f581271e47ea02738d.tar.gz
Prevent needing to scroll on jwt.decode example
-rw-r--r--docs/index.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 2f2e127..8e96c0f 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -22,10 +22,11 @@ Example Usage
>>> import jwt
- >>> jwt.encode({'some': 'payload'}, 'secret', algorithm='HS256')
+ >>> encoded_jwt = jwt.encode({'some': 'payload'}, 'secret', algorithm='HS256')
+ >>> encoded_jwt
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg'
- >>> jwt.decode('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg', 'secret', algorithms=['HS256'])
+ >>> jwt.decode(encoded_jwt, 'secret', algorithms=['HS256'])
{'some': 'payload'}
See :doc:`Usage Examples <usage>` for more examples.