Skip to content

Commit 7f7e96a

Browse files
committed
Added some line breaks to keep README.md text lines nice and short.
1 parent 57c2201 commit 7f7e96a

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ You can still get the payload by setting the `verify` argument to `False`.
4848
jwt.decode('someJWTstring', verify=False)
4949
```
5050

51-
The `decode()` function can raise other exceptions, e.g. for invalid issuer or audience (see below). All exceptions that signify that the token is invalid extend from the base `InvalidTokenError` exception class, so applications can use this approach to catch any issues relating to invalid tokens:
51+
The `decode()` function can raise other exceptions, e.g. for invalid issuer or
52+
audience (see below). All exceptions that signify that the token is invalid
53+
extend from the base `InvalidTokenError` exception class, so applications can
54+
use this approach to catch any issues relating to invalid tokens:
5255

5356
```python
5457
try:
@@ -88,7 +91,8 @@ jwt.encode({'some': 'payload'}, 'secret', 'HS512')
8891

8992
Usage of RSA (RS\*) and EC (EC\*) algorithms require a basic understanding
9093
of how public-key cryptography is used with regards to digital signatures.
91-
If you are unfamiliar, you may want to read [this article](http://en.wikipedia.org/wiki/Public-key_cryptography).
94+
If you are unfamiliar, you may want to read
95+
[this article](http://en.wikipedia.org/wiki/Public-key_cryptography).
9296

9397
When using the RSASSA-PKCS1-v1_5 algorithms, the `key` argument in both
9498
`jwt.encode()` and `jwt.decode()` (`"secret"` in the examples) is expected to
@@ -101,8 +105,8 @@ be an Elliptic Curve public or private key in PEM format. The type of key
101105

102106
## Support of registered claim names
103107

104-
JSON Web Token defines some registered claim names and defines how they should be
105-
used. PyJWT supports these registered claim names:
108+
JSON Web Token defines some registered claim names and defines how they should
109+
be used. PyJWT supports these registered claim names:
106110

107111
- "exp" (Expiration Time) Claim
108112
- "nbf" (Not Before Time) Claim
@@ -146,7 +150,8 @@ Expiration time will be compared to the current UTC time (as given by
146150
`timegm(datetime.utcnow().utctimetuple())`), so be sure to use a UTC timestamp
147151
or datetime in encoding.
148152

149-
You can turn off expiration time verification with the `verify_expiration` argument.
153+
You can turn off expiration time verification with the `verify_expiration`
154+
argument.
150155

151156
PyJWT also supports the leeway part of the expiration time definition, which
152157
means you can validate a expiration time which is in the past but not very far.
@@ -170,7 +175,8 @@ time.sleep(32)
170175
jwt.decode(jwt_payload, 'secret', leeway=10)
171176
```
172177

173-
Instead of specifying the leeway as a number of seconds, a `datetime.timedelta` instance can be used. The last line in the example above is equivalent to:
178+
Instead of specifying the leeway as a number of seconds, a `datetime.timedelta`
179+
instance can be used. The last line in the example above is equivalent to:
174180

175181
```python
176182
jwt.decode(jwt_payload, 'secret', leeway=datetime.timedelta(seconds=10))

0 commit comments

Comments
 (0)