Skip to main content

Extended JWT integration with Sanic

Project description

🛡 Sanic-JWT-Extended 🛡

Buiild Tests Deploy Netlify
Quality codecov Codacy Badge Maintainability
Package PyPI GitHub release (latest SemVer including pre-releases) PyPI - Python Version
Stats Downloads Downloads
Community Gitter

☢️ This is README of 1.0 version. Click here to checkout legacy version(v0.4.4)

🚀 What is Sanic-JWT-Extended?

Sanic-JWT-Extended is an open source Sanic extension that provides JWT support (comply with RFC standard)

💡 Why Sanic-JWT-Extended?

Sanic-JWT-Extended not only adds support for using JSON Web Tokens (JWT) to Sanic 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 public claims with namespacing
  • Support for adding private claims
  • Refresh tokens
  • Token freshness and separate view decorators to only allow fresh tokens
  • Access control
  • blacklist support with some built-in blacklist
  • Provides Token object for easier jwt manifulation

⚡️ Installation

$ pip install sanic-jwt-extended --pre
$ poetry add sanic-jwt-extended --git https://github.com/NovemberOscar/Sanic-JWT-Extended.git
$ pipenv install sanic-jwt-extended --pre

📚 Documentation

🛠 Developing Sanic-JWT-Extended

Prerequesties

Installaion

$ make env

this will install dependencies with poetry. if poetry not found, will install poetry.

Development

  • make format: this will format your code with isort and black
  • make check: this will lint your code with isort, black, mypy and pylint
  • make clean: this will remove temporary things.

Commit Convention

Conventional Commits

Testing

$ make check  # check convention and type
$ poetry run pytest

with coverage:

$ poetry run pytest --cov=sanic_jwt_extended tests/

Make sure you wrote TCs about your work!

Project details


Download files

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

Source Distribution

Sanic-JWT-Extended-1.0.dev12.tar.gz (13.3 kB view hashes)

Uploaded Source

Built Distribution

Sanic_JWT_Extended-1.0.dev12-py3-none-any.whl (15.9 kB view hashes)

Uploaded Python 3

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