Skip to main content

Extended JWT integration with Flask

Project description

Flask-JWT-Extended

Build Status Coverage Status PyPI version Documentation Status Join the chat at https://gitter.im/flask-jwt-extended/Lobby

When to use Flask-JWT-Extended?

Flask-JWT-Extended not only adds support for using JSON Web Tokens (JWT) to Flask for protecting views, but also many helpful (and optional) features built in to make working with JSON Web Tokens easier. These include:

  • Support for adding custom claims to JSON Web Tokens
  • Custom claims validation on received tokens
  • Creating tokens from complex objects or complex object from received tokens
  • Refresh tokens
  • Token freshness and separate view decorators to only allow fresh tokens
  • Token revoking/blacklisting
  • Storing tokens in cookies and CSRF protection

When not to use Flask-JWT-Extended?

This extension is very opinionated about what claims need to exist in received JWTs to get all these extra features to work. If you are working with other JWT providers, only using Flask for rapid prototyping of your application, or do not care about any of these extra features, Flask-JWT-Simple may be a better fit for your application. It is the sister extension of this one (both maintained by me), which strips all of the extra features and opinionated JWT requirements out.

Upgrading to the 3.x.x releases

See here for help upgrading to the 3.x.x releases.

Installation

View Installation Instructions

Usage

View the documentation online

Chatting

We have moved from irc to gitter. The official support channel can now be found at https://gitter.im/flask-jwt-extended/Lobby.

Testing and Code Coverage

We require 100% code coverage in our unit tests. You can run the tests locally with tox which will print out a code coverage report. Creating a pull request will run the tests against python 2.7, 3.4, 3.5, 3.6, and PyPy.

$ tox

Generating Documentation

You can generate a local copy of the documentation. After installing the requirements, go to the docs directory and run:

$ make clean && make html

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Flask-JWT-Extended-3.13.1.tar.gz (28.5 kB view details)

Uploaded Source

File details

Details for the file Flask-JWT-Extended-3.13.1.tar.gz.

File metadata

  • Download URL: Flask-JWT-Extended-3.13.1.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.2 CPython/3.6.4

File hashes

Hashes for Flask-JWT-Extended-3.13.1.tar.gz
Algorithm Hash digest
SHA256 48e54a96410e10c456f1a0f1bde7187f88db658ca64e41d548ed4e91251d1f83
MD5 8d16a8d87cecf8d9199271d64981c961
BLAKE2b-256 47a25cc19157ad3627fbd3d92ae1ef78077ba3100fcd2df96b0f6b9308611f7e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page