|
4 | 4 | [](https://badge.fury.io/py/Flask-JWT-Extended) |
5 | 5 | [](http://flask-jwt-extended.readthedocs.io/en/latest/) |
6 | 6 |
|
7 | | -### Why Flask-JWT-Extended? |
| 7 | +### When to use Flask-JWT-Extended? |
8 | 8 |
|
9 | | -Flask-JWT-Extended adds support for using JSON Web Tokens (JWT) to Flask for protecting views. |
10 | | - |
11 | | -This has several **optional** features built it to make working with JSON Web Tokens |
| 9 | +Flask-JWT-Extended not only adds support for using JSON Web Tokens (JWT) to Flask for protecting views, |
| 10 | +but also many helpful (and **optional**) features built in to make working with JSON Web Tokens |
12 | 11 | easier. These include: |
13 | 12 |
|
14 | 13 | * Support for adding custom claims to JSON Web Tokens |
| 14 | +* Custom claims validation on received tokens |
| 15 | +* Creating tokens from complex objects or complex object from received tokens |
15 | 16 | * [Refresh tokens](https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/) |
16 | 17 | * Token freshness and separate view decorators to only allow fresh tokens |
17 | | -* Token revoking |
| 18 | +* Token revoking/blacklisting |
18 | 19 | * Storing tokens in cookies and CSRF protection |
19 | 20 |
|
| 21 | +### When *not* to use Flask-JWT-Extended? |
| 22 | + |
| 23 | +This extension is very opinionated about what claims need to exist in received |
| 24 | +JWTs to get all these extra features to work. If you are working with other JWT |
| 25 | +providers, only using Flask for rapid prototyping of your application, or do |
| 26 | +not care about any of these extra features, [Flask-JWT-Simple](https://github.com/vimalloc/flask-jwt-simple) |
| 27 | +may be a better fit for your application. It is the sister extension of this |
| 28 | +one (both maintained by me), which strips all of the extra features and opinionated |
| 29 | +JWT requirements out. |
| 30 | + |
| 31 | + |
20 | 32 | ### Upgrading to the 3.x.x releases |
21 | 33 | [See here](https://github.com/vimalloc/flask-jwt-extended/releases/tag/3.0.0) for |
22 | 34 | help upgrading to the 3.x.x releases. |
|
0 commit comments