From 6a624f42112661d1e4ea43ce7a78a9d6c693644b Mon Sep 17 00:00:00 2001 From: "Abram (^o^)" Date: Tue, 8 Mar 2022 15:35:56 +0100 Subject: 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` --- docs/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- cgit v1.2.1