No project description provided
Project description
Auth Web Kit
Библиотека для аутентификации в NiceGUI приложениях.
Установка
pip install auth-web-kit
Быстрый старт
from openapi_client import some as some_client
from openapi_client import another as another_client
from settings import settings
auth = shared.Auth(
redis=redis_client,
redirect_from=settings.app.SELF_REDIRECT_URL,
auth_web_client_url=settings.auth_client.WEB_URL,
unauthorized_exception_classes=[
some_client.exceptions.UnauthorizedException,
another_client.exceptions.UnauthorizedException,
],
forbidden_exception_classes=[
some_client.exceptions.ForbiddenException,
another_client.exceptions.ForbiddenException,
],
)
error = shared.Error()
# порядок подключения важен
app.add_middleware(auth.middleware)
app.add_middleware(error.middleware)
app.on_exception(auth.on.unknown_error)
app.on_exception(auth.on.unauthorized)
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
auth_web_kit-1.2.0.tar.gz
(5.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file auth_web_kit-1.2.0.tar.gz.
File metadata
- Download URL: auth_web_kit-1.2.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.12 Linux/6.8.0-101-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
876214a08a1d219002dc7bcafc74aa296155022690cd12d37f94f33ec5dccf3a
|
|
| MD5 |
730a319840ded2d5ff585b4939daddeb
|
|
| BLAKE2b-256 |
54fa0d70632f42b9a4c63736a1e2658a13faffe58b2bd1c7ab4508fcbff52f5f
|
File details
Details for the file auth_web_kit-1.2.0-py3-none-any.whl.
File metadata
- Download URL: auth_web_kit-1.2.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.12 Linux/6.8.0-101-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82e7ab33a68294d7b472c9229b8b25541a3f1bf91c5a3f7ff2edcc198749ad2f
|
|
| MD5 |
3edd8f8f0e8c79bb487a23fde75c3d22
|
|
| BLAKE2b-256 |
336d8f6d982ef0c8b340b997e9c394edb003e288a360fe4e893513e89a685eb5
|