neoteroi-auth


Nameneoteroi-auth JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryFramework to handle authentication and authorization.
upload_time2022-12-29 11:47:32
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords authentication authorization claims identity strategy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Build](https://github.com/Neoteroi/guardpost/workflows/Build/badge.svg)](https://github.com/Neoteroi/guardpost/actions?query=workflow%3ABuild)
[![pypi](https://img.shields.io/pypi/v/neoteroi-auth.svg?color=blue)](https://pypi.org/project/neoteroi-auth/)
[![versions](https://img.shields.io/pypi/pyversions/neoteroi-auth.svg)](https://github.com/Neoteroi/guardpost)
[![license](https://img.shields.io/github/license/Neoteroi/guardpost.svg)](https://github.com/Neoteroi/guardpost/blob/main/LICENSE)
[![codecov](https://codecov.io/gh/Neoteroi/guardpost/branch/main/graph/badge.svg?token=sBKZG2D1bZ)](https://codecov.io/gh/Neoteroi/guardpost)

# 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](https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-2.2);
although its implementation is extremely different.

## Installation

```bash
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](./examples).

## 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](https://www.neoteroi.dev/blacksheep/) web framework, to implement
[authentication and authorization
strategies](https://www.neoteroi.dev/blacksheep/authentication/) for request
handlers.

To see how `neoteroi-auth` is used in `blacksheep` web framework, read:

* [Authentication](https://www.neoteroi.dev/blacksheep/authentication/)
* [Authorization](https://www.neoteroi.dev/blacksheep/authorization/)

# Documentation

Under construction. 🚧

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "neoteroi-auth",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "authentication,authorization,claims,identity,strategy",
    "author": "",
    "author_email": "Roberto Prevato <roberto.prevato@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/dd/76/51b3880f6111248b472bbf09737fedf5f17b3083bd04942c1630c57615bc/neoteroi_auth-0.0.3.tar.gz",
    "platform": null,
    "description": "[![Build](https://github.com/Neoteroi/guardpost/workflows/Build/badge.svg)](https://github.com/Neoteroi/guardpost/actions?query=workflow%3ABuild)\n[![pypi](https://img.shields.io/pypi/v/neoteroi-auth.svg?color=blue)](https://pypi.org/project/neoteroi-auth/)\n[![versions](https://img.shields.io/pypi/pyversions/neoteroi-auth.svg)](https://github.com/Neoteroi/guardpost)\n[![license](https://img.shields.io/github/license/Neoteroi/guardpost.svg)](https://github.com/Neoteroi/guardpost/blob/main/LICENSE)\n[![codecov](https://codecov.io/gh/Neoteroi/guardpost/branch/main/graph/badge.svg?token=sBKZG2D1bZ)](https://codecov.io/gh/Neoteroi/guardpost)\n\n# Authentication and authorization framework for Python apps\nBasic framework to handle authentication and authorization in asynchronous\nPython applications.\n\n**Features:**\n\n- strategy to implement authentication (who or what is using a service?)\n- strategy to implement authorization (is the acting identity authorized to do a certain action?)\n- support for dependency injection for classes handling authentication and\n  authorization requirements\n- built-in support for JSON Web Tokens (JWTs) authentication\n\nThis library is freely inspired by [authorization in ASP.NET\nCore](https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-2.2);\nalthough its implementation is extremely different.\n\n## Installation\n\n```bash\npip install neoteroi-auth\n```\n\nTo install with support for `JSON Web Tokens (JWTs)` validation:\n\n```\npip install neoteroi-auth[jwt]\n```\n\n### Examples\n\nFor examples, refer to the [examples folder](./examples).\n\n## If you have doubts about authentication vs authorization...\n`Authentication` answers the question: _Who is the user who is initiating the\naction?_, or more in general: _Who is the user, or what is the service, that is\ninitiating the action?_.\n\n`Authorization` answers the question: _Is the user, or service, authorized to\ndo something?_.\n\nUsually, to implement authorization, is necessary to have the context of the\nentity that is executing the action.\n\n## Usage in BlackSheep\n`neoteroi-auth` is used in the second version of the\n[BlackSheep](https://www.neoteroi.dev/blacksheep/) web framework, to implement\n[authentication and authorization\nstrategies](https://www.neoteroi.dev/blacksheep/authentication/) for request\nhandlers.\n\nTo see how `neoteroi-auth` is used in `blacksheep` web framework, read:\n\n* [Authentication](https://www.neoteroi.dev/blacksheep/authentication/)\n* [Authorization](https://www.neoteroi.dev/blacksheep/authorization/)\n\n# Documentation\n\nUnder construction. \ud83d\udea7\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Framework to handle authentication and authorization.",
    "version": "0.0.3",
    "split_keywords": [
        "authentication",
        "authorization",
        "claims",
        "identity",
        "strategy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "eefcb49940ce0f675f4d59a4fc1ce3f5",
                "sha256": "4970c67d21580480e86d14656bf0e408d2bde8214a5db21249620a04252c9bdb"
            },
            "downloads": -1,
            "filename": "neoteroi_auth-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eefcb49940ce0f675f4d59a4fc1ce3f5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 15521,
            "upload_time": "2022-12-29T11:47:30",
            "upload_time_iso_8601": "2022-12-29T11:47:30.813844Z",
            "url": "https://files.pythonhosted.org/packages/e3/a7/1eae7b2f1113ec8ff6a9b3e864cc8f2cde62645e706c07a8595645f4982c/neoteroi_auth-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "f53a61708497d3dd08b181b99f1e299b",
                "sha256": "6925f52d5a6465cd1b998b5c0d591ba8f88b03948da45fb40411faf5581a9f7d"
            },
            "downloads": -1,
            "filename": "neoteroi_auth-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "f53a61708497d3dd08b181b99f1e299b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 12877,
            "upload_time": "2022-12-29T11:47:32",
            "upload_time_iso_8601": "2022-12-29T11:47:32.266727Z",
            "url": "https://files.pythonhosted.org/packages/dd/76/51b3880f6111248b472bbf09737fedf5f17b3083bd04942c1630c57615bc/neoteroi_auth-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-29 11:47:32",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "neoteroi-auth"
}
        
Elapsed time: 0.02904s