Framework to handle authentication and authorization.
Project description
Authentication and authorization framework for Python apps
Basic framework to handle authentication and authorization in asynchronous Python applications.
Features:
- strategy to implement authentication (who or what is using a service?)
- strategy to implement authorization (is the acting identity authorized to do a certain action?)
- support for dependency injection for classes handling authentication and authorization requirements
- built-in support for JSON Web Tokens (JWTs) authentication
This library is freely inspired by authorization in ASP.NET Core; although its implementation is extremely different.
Installation
pip install neoteroi-auth
To install with support for JSON Web Tokens (JWTs)
validation:
pip install neoteroi-auth[jwt]
Examples
For examples, refer to the examples folder.
If you have doubts about authentication vs authorization...
Authentication
answers the question: Who is the user who is initiating the
action?, or more in general: Who is the user, or what is the service, that is
initiating the action?.
Authorization
answers the question: Is the user, or service, authorized to
do something?.
Usually, to implement authorization, is necessary to have the context of the entity that is executing the action.
Usage in BlackSheep
neoteroi-auth
is used in the second version of the
BlackSheep web framework, to implement
authentication and authorization
strategies for request
handlers.
To see how neoteroi-auth
is used in blacksheep
web framework, read:
Documentation
Under construction. 🚧
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
Hashes for neoteroi_auth-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f09732363c0612ef07de5b2afcc4db6914382fe27289ead2ffa7d8714e3e6edd |
|
MD5 | 24fd22ee94b046cf5612d7ae4b5fe405 |
|
BLAKE2b-256 | 6a5b52743daeb782e943a8a217203f0dad3f34d396f8cbc4c180a78cf0555229 |