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.
What do I do?
It's easy: (1) install, (2) initialize, and (3) authenticate.
pip install sanic-jwt
from sanic import Sanic from sanic_jwt import Initialize def my_authenticate(request, *args, **kwargs): ... app = Sanic() Initialize( app, authenticate=my_authenticate )
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.