File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,30 @@ except jwt.InvalidTokenError:
6262 pass # do something sensible here, e.g. return HTTP 403 status code
6363```
6464
65+ You may also override exception checking via an ` options ` dictionary. The default
66+ options are as follows:
67+
68+ ``` python
69+ options = {
70+ ' verify_signature' : True ,
71+ ' verify_exp' : True ,
72+ ' verify_nbf' : True ,
73+ ' verify_iat' : True ,
74+ ' verify_aud`: True
75+ }
76+ ```
77+
78+ You can skip individual checks by passing an ` options ` dictionary with certain keys set to ` False ` .
79+ For example, if you want to verify the signature of a JWT that has already expired.
80+
81+ ``` python
82+ options = {
83+ ' verify_exp' : True ,
84+ }
85+
86+ jwt.decode(' someJWTstring' , ' secret' , options = options)
87+ ```
88+
6589## Tests
6690
6791You can run tests from the project root after cloning with:
You can’t perform that action at this time.
0 commit comments