diff options
author | Michael Davis <mike.davis@webfilings.com> | 2015-04-07 09:29:06 -0500 |
---|---|---|
committer | Michael Davis <mike.davis@webfilings.com> | 2015-04-07 09:29:06 -0500 |
commit | 143feeded35dc3f119ff480a0550dacd36d30596 (patch) | |
tree | f46c2ce8fa738e51048ec17d2f5562dc66728e6e | |
parent | b08a82705735358869f42cf1c8f7169f96349253 (diff) | |
download | pyjwt-143feeded35dc3f119ff480a0550dacd36d30596.tar.gz |
Update README with options information
-rw-r--r-- | README.md | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -62,6 +62,30 @@ except jwt.InvalidTokenError: pass # do something sensible here, e.g. return HTTP 403 status code ``` +You may also override exception checking via an `options` dictionary. The default +options are as follows: + +```python +options = { + 'verify_signature': True, + 'verify_exp': True, + 'verify_nbf': True, + 'verify_iat': True, + 'verify_aud`: True +} +``` + +You can skip individual checks by passing an `options` dictionary with certain keys set to `False`. +For example, if you want to verify the signature of a JWT that has already expired. + +```python +options = { + 'verify_exp': True, +} + +jwt.decode('someJWTstring', 'secret', options=options) +``` + ## Tests You can run tests from the project root after cloning with: |