summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbram (^o^) <israelvictory87@gmail.com>2022-03-08 15:35:56 +0100
committerGitHub <noreply@github.com>2022-03-08 20:35:56 +0600
commit6a624f42112661d1e4ea43ce7a78a9d6c693644b (patch)
tree6ff097a2eee2fb6dce38eefa70a04ee6888abfb5
parent827d4425dbd2e6f9b521e514ced889cfb3aada21 (diff)
downloadpyjwt-6a624f42112661d1e4ea43ce7a78a9d6c693644b.tar.gz
Fixed TypeError (#738)
In the example above [https://github.com/jpadilla/pyjwt/edit/master/docs/usage.rst#encoding--decoding-tokens-with-hs256], when tried, it throws a TypeError that says: `encode() got an unexpected keyword argument 'algorithms'`, so I changed the `algorithms` to `algorithm`
-rw-r--r--docs/usage.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/usage.rst b/docs/usage.rst
index 9d541d5..91d9679 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -8,7 +8,7 @@ Encoding & Decoding Tokens with HS256
>>> import jwt
>>> key = "secret"
- >>> encoded = jwt.encode({"some": "payload"}, key, algorithms="HS256")
+ >>> encoded = jwt.encode({"some": "payload"}, key, algorithm="HS256")
>>> print(encoded)
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg
>>> jwt.decode(encoded, key, algorithms="HS256")