JWT oauth flow for Sanic
Project description
Sanic JWT
Sanic JWT adds authentication protection and endpoints to Sanic.
It is both easy to get up and running, and extensible for the developer. It can act to protect endpoints and also provide authentication scoping, all wrapped into a nice JWT.
Read the documentation | View the source code
What do I do?
It's easy: (1) install, (2) initialize, and (3) authenticate.
Install:
pip install sanic-jwt
Initialize:
from sanic import Sanic
from sanic_jwt import Initialize
def my_authenticate(request, *args, **kwargs):
...
app = Sanic()
Initialize(
app,
authenticate=my_authenticate
)
Authenticate:
http://localhost/auth
Can I customize it?
Definitely! Sanic JWT is made to allow developers to customize the operation to fit their needs. Check out the documentation to learn how.
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
Built Distribution
File details
Details for the file sanic-jwt-1.8.0.tar.gz
.
File metadata
- Download URL: sanic-jwt-1.8.0.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae16cdaebc8cd9569dae6f633a2a876205d7b36134e5920698ae5b8e4f1b83f1 |
|
MD5 | b043b92964f623041949ac873be113e8 |
|
BLAKE2b-256 | 44cf380f4c698683d886b2c8a08ea68ffe11e8a75ccf354035c768bc842613bf |
File details
Details for the file sanic_jwt-1.8.0-py3-none-any.whl
.
File metadata
- Download URL: sanic_jwt-1.8.0-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bd2a748d1bef25a330c38b574804c5ba543808f46ffaef3068001dd54b4f9c7 |
|
MD5 | 3cdb0efe9203f1f4e0be30ad2e2594fc |
|
BLAKE2b-256 | 454a84adefa8f19d427f07aca2eb848b984fd042e3bac19830aabc3c2089ee8c |