summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Davis <mike.davis@webfilings.com>2015-04-07 09:29:06 -0500
committerMichael Davis <mike.davis@webfilings.com>2015-04-07 09:29:06 -0500
commit143feeded35dc3f119ff480a0550dacd36d30596 (patch)
treef46c2ce8fa738e51048ec17d2f5562dc66728e6e
parentb08a82705735358869f42cf1c8f7169f96349253 (diff)
downloadpyjwt-143feeded35dc3f119ff480a0550dacd36d30596.tar.gz
Update README with options information
-rw-r--r--README.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/README.md b/README.md
index 167f78e..a0cfc45 100644
--- a/README.md
+++ b/README.md
@@ -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: