We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24b0ba5 commit f2d0ebeCopy full SHA for f2d0ebe
docs/usage.rst
@@ -102,6 +102,18 @@ Specifying Additional Headers
102
'eyJhbGciOiJIUzI1NiIsImtpZCI6IjIzMDQ5ODE1MWMyMTRiNzg4ZGQ5N2YyMmI4NTQxMGE1IiwidHlwIjoiSldUIn0.eyJzb21lIjoicGF5bG9hZCJ9.0n16c-shKKnw6gervyk1Dge35tvzbzQ_KCV3H3bgoJ0'
103
104
105
+By default the ``typ`` is attaching to the headers. In case when you don't need to pass this header to the token, you have to explicitly null it.
106
+
107
+.. code-block:: pycon
108
109
+ >>> jwt.encode(
110
+ ... {"some": "payload"},
111
+ ... "secret",
112
+ ... algorithm="HS256",
113
+ ... headers={"typ": None},
114
+ ... )
115
116
117
Reading the Claimset without Validation
118
---------------------------------------
119
0 commit comments