Skip to main content

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)

Metadata

Release files for auth-web-kit 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for auth-web-kit 1.2.3
File Size Uploaded
auth_web_kit-1.2.3.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for auth-web-kit 1.2.3
File Interpreter ABI Platform
auth_web_kit-1.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.4 kB

Release files / auth_web_kit-1.2.3.tar.gz

Download URL auth_web_kit-1.2.3.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
200b15d9f75e25b10762a52864995b7f6a752f20cd8c5ad3029d24ebb31e1f7c
BLAKE2b-256 checksum
How to use checksums
e97cae38fa469923afcbb9f5be1bc9f3c737181df4f908c62f4e341d9b4fd266
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.10 Windows/11

Release files / auth_web_kit-1.2.3-py3-none-any.whl

Download URL auth_web_kit-1.2.3-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f61620d1a1154852d385026146d0761e80ae9b3667a3264d0ed32847fe1a5ea8
BLAKE2b-256 checksum
How to use checksums
c489d93c8180126b9a009dcfa86f8ef84a29def5b04c308a6a1a582889707922
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.10 Windows/11

Release history Release notifications | RSS feed

This release

1.2.3 This release

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page