Skip to main content

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.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auth_web_kit-1.2.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file auth_web_kit-1.2.1.tar.gz.

File metadata

  • Download URL: auth_web_kit-1.2.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.10 Windows/11

File hashes

Hashes for auth_web_kit-1.2.1.tar.gz
Algorithm Hash digest
SHA256 0f3876efc6a946db7d83e1dd5fadc4eb090921d44563189c8ef7662b17483a07
MD5 9a325f2935d8b77aa395c624069b19ac
BLAKE2b-256 4b8cc3d6b98724bc53364213b6777059fb7d64df73bc33ae9068baf12be273a9

See more details on using hashes here.

File details

Details for the file auth_web_kit-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: auth_web_kit-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.10 Windows/11

File hashes

Hashes for auth_web_kit-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f6da12d636b5c9eab999f1689542e7bbb2a7ff7241cf63330cc09628ebcd51b
MD5 8c749ac5890394ea60cdbfeb84a67968
BLAKE2b-256 ec2711be42ea5900131fcafd0adadd61a6cda88f712340cb68e0286fd6f28465

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page