Skip to content

ahopkins/sanic-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8bba87d · Jan 5, 2021
Jan 4, 2021
Jan 5, 2021
Jun 10, 2020
Jan 5, 2021
Jan 5, 2021
Feb 12, 2018
Oct 25, 2018
Apr 24, 2018
Jan 19, 2018
Aug 2, 2018
Jan 2, 2020
Jan 21, 2018
Feb 11, 2018
Aug 6, 2017
Aug 6, 2017
May 16, 2019
Feb 12, 2018
Nov 8, 2018
Nov 8, 2018
Dec 28, 2020
Jan 5, 2021

Repository files navigation

Sanic JWT

Latest PyPI version Python versions Version status MIT License

Build Status Documentation Codacy Badge Test Coverage Code style: black

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.