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.1.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.1.0.tar.gz.
File metadata
- Download URL: auth_web_kit-1.1.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 |
2c96490bc52455d958116b0e8594852527f2ef03441a486359386b5434e90384
|
|
| MD5 |
a0a72a28adf17c641a97c3c2eed6cd2b
|
|
| BLAKE2b-256 |
5582c65000bda49b2d7b54c697b87b2c25d2f1e245b4457be7ef825a0b9d6d39
|
File details
Details for the file auth_web_kit-1.1.0-py3-none-any.whl.
File metadata
- Download URL: auth_web_kit-1.1.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 |
08fbb63b2fcfcdacdaa244a13c7d97d168a90b468ecbc2e415620c32ed3d7738
|
|
| MD5 |
3c371cfc2e86a657c5f00fd9d7d6def9
|
|
| BLAKE2b-256 |
d22e6998070d8f27d693fa102df5a31b2239bf8b4ca5942b79fe945d3c8d2ba6
|