Skip to main content

Framework to handle authentication and authorization.

Project description

Build pypi versions license codecov

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

guardpost-1.0.1.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

guardpost-1.0.1-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file guardpost-1.0.1.tar.gz.

File metadata

  • Download URL: guardpost-1.0.1.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for guardpost-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6cb7ec1e3c55d529ec0ef4ddbc6e0b36baa8d629f494ac12373ac2ed0d2edb91
MD5 60a9ddde2dabb9ae76f19172c02a9341
BLAKE2b-256 f8d7f12bb47c12fea28dd6190920cc2b35542caf2b29192789e564558cb5260a

See more details on using hashes here.

File details

Details for the file guardpost-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: guardpost-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for guardpost-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 58fe07ad65d59a543796fea41b5d78b094dca068964253033cba19d32477801d
MD5 775b6a01ffc414679d4b01f7dba4f34c
BLAKE2b-256 238694fbfcf0876a8cd5d595312f4ebe0d906c2c8ebd92237a27d9d66e8bc7d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page