Metadata-Version: 2.1
Name: aioauth
Version: 0.1.1
Summary: Asynchronous OAuth 2.0 framework for Python 3.
Home-page: https://github.com/aliev/aioauth
Author: Ali Aliyev
Author-email: ali@aliev.me
License: The MIT License (MIT)
Project-URL: Source, https://github.com/aliev/aioauth
Keywords: asyncio oauth2 oauth
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6.0
Description-Content-Type: text/markdown
Provides-Extra: test
Requires-Dist: async-asgi-testclient (==1.4.4) ; extra == 'test'
Requires-Dist: pre-commit (==2.4.0) ; extra == 'test'
Requires-Dist: black (==19.10b0) ; extra == 'test'
Requires-Dist: isort (==4.3.21) ; extra == 'test'
Requires-Dist: flake8 (==3.8.2) ; extra == 'test'
Requires-Dist: flake8-black (==0.2.0) ; extra == 'test'
Requires-Dist: flake8-blind-except (==0.1.1) ; extra == 'test'
Requires-Dist: flake8-builtins (==1.5.3) ; extra == 'test'
Requires-Dist: flake8-comprehensions (==3.2.3) ; extra == 'test'
Requires-Dist: flake8-mutable (==1.2.0) ; extra == 'test'
Requires-Dist: flake8-print (==3.1.4) ; extra == 'test'
Requires-Dist: flake8-quotes (==3.2.0) ; extra == 'test'
Requires-Dist: flake8-tuple (==0.4.1) ; extra == 'test'
Requires-Dist: pytest (==5.4.3) ; extra == 'test'
Requires-Dist: pytest-asyncio (==0.12.0) ; extra == 'test'
Requires-Dist: pytest-cov (==2.9.0) ; extra == 'test'
Requires-Dist: pytest-env (==0.6.2) ; extra == 'test'
Requires-Dist: pytest-sugar (==0.9.3) ; extra == 'test'
Requires-Dist: testfixtures (==6.14.1) ; extra == 'test'
Requires-Dist: bump2version (==0.5.11) ; extra == 'test'
Requires-Dist: tox (==3.20.0) ; extra == 'test'
Requires-Dist: wheel (==0.33.6) ; extra == 'test'
Requires-Dist: twine (==1.14.0) ; extra == 'test'
Requires-Dist: watchdog (==0.9.0) ; extra == 'test'

## Asynchronous OAuth 2.0 framework for Python 3

`aioauth` implements [OAuth 2.0 protocol](https://tools.ietf.org/html/rfc6749) and can be used in asynchronous frameworks like [FastAPI / Starlette](https://github.com/tiangolo/fastapi), [aiohttp](https://github.com/aio-libs/aiohttp). It can work with any databases like `MongoDB`, `PostgreSQL`, `MySQL` and ORMs like [gino](https://python-gino.org/), [sqlalchemy](https://www.sqlalchemy.org/) or [databases](https://pypi.org/project/databases/) over simple [BaseDB](src/aioauth/db.py) interface.

## Why this project exists?

There are few great OAuth frameworks for Python like [oauthlib](https://github.com/oauthlib/oauthlib) and [authlib](https://github.com/lepture/authlib), but they do not support asyncio and rewriting these libraries to asyncio is a significant challenge (see issues [here](https://github.com/lepture/authlib/issues/63) and [here](https://github.com/oauthlib/oauthlib/issues/415)).

## Supported RFCs

- [x] [The OAuth 2.0 Authorization Framework](https://tools.ietf.org/html/rfc6749)
- [X] [OAuth 2.0 Token Introspection](https://tools.ietf.org/html/rfc7662)
- [X] [Proof Key for Code Exchange by OAuth Public Clients](https://tools.ietf.org/html/rfc7636)

## Installation

```
python -m pip install aioauth
```

## Settings and defaults

| Setting                                | Default value | Description                                                                                                         |
| -------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------- |
| AIOAUTH_TOKEN_EXPIRES_IN               | 86400         | Access token lifetime.                                                                                              |
| AIOAUTH_AUTHORIZATION_CODE_EXPIRES_IN  | 300           | Authorization code lifetime.                                                                                        |
| AIOAUTH_INSECURE_TRANSPORT             | False         | Allow connections over SSL only. When this option is disabled server will raise "HTTP method is not allowed" error. |


