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.0.0.tar.gz
(4.9 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.0.0.tar.gz.
File metadata
- Download URL: auth_web_kit-1.0.0.tar.gz
- Upload date:
- Size: 4.9 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 |
32e0e3a294404b437c26eaf8b55aa50208df743f83ed3b8d22c0fc536fc2d512
|
|
| MD5 |
a2e949825d2ff923c7fbe13f9593af00
|
|
| BLAKE2b-256 |
b28e73739de6733c6c3811c8519fdd093bb45bd4cb5b5b86783ace8458a39d52
|
File details
Details for the file auth_web_kit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: auth_web_kit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.9 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 |
067e299c747bc7b3766bc75880e36e6cd559d654d3711acfa72d3234d9d256ce
|
|
| MD5 |
1c22ca9fb40796de5237241f5da20f37
|
|
| BLAKE2b-256 |
5dcba2bf3bd60b49c2c7ed36f3a577a5d28124d1222d9bbbcb1b26afcc5c1eeb
|