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 guardpost
To install with support for JSON Web Tokens (JWTs)
validation:
pip install guardpost[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
guardpost
is used in the BlackSheep
web framework, to implement authentication and authorization
strategies for request
handlers.
To see how guardpost
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
File details
Details for the file guardpost-1.0.0.tar.gz
.
File metadata
- Download URL: guardpost-1.0.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7468c7c71cbdbb96ab303402080df9ebb0df0a89e9d6a9880a7c9cb81aded54c |
|
MD5 | 3ef6181b308a6cf901baeba6fde56fde |
|
BLAKE2b-256 | 812614431329e66dd0944caf665a352bccf294b5a6148807957f6efb89eab4cb |
File details
Details for the file guardpost-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: guardpost-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 765b774e0aab93c0bf1a84a2b6a62b79057a02c1ccb6ed34e4e72bfb96b540ca |
|
MD5 | ad9510347ac551b7c46a7f340f2efb42 |
|
BLAKE2b-256 | a4ae897ce435e9297f3f044ecdc06bba9040d3c0a22156b60064db282fb57082 |