Skip to content

Commit 6a624f4

Browse files
authored
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`
1 parent 827d442 commit 6a624f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Encoding & Decoding Tokens with HS256
88
99
>>> import jwt
1010
>>> key = "secret"
11-
>>> encoded = jwt.encode({"some": "payload"}, key, algorithms="HS256")
11+
>>> encoded = jwt.encode({"some": "payload"}, key, algorithm="HS256")
1212
>>> print(encoded)
1313
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg
1414
>>> jwt.decode(encoded, key, algorithms="HS256")

0 commit comments

Comments
 (0)