Skip to main content

Basic auth decorator for Django Ninja.

Project description

django-basic-auth-decorator

Basic auth decorator for Django.

Installation

You can install the package via pip:

pip install django-basic-auth-decorator

Usage

from django_basic_auth_decorator.decorators import basic_auth

# Define your allowed credentials
CREDENTIALS = [
    ("admin", "adminpass"),
    ("user", "userpass"),
]

# Apply the decorator on a view function
@basic_auth(CREDENTIALS)
def my_view(request):
    ...

License

This project is licensed under the terms of the MIT license.

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

django_basic_auth_decorator-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

django_basic_auth_decorator-1.0.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file django_basic_auth_decorator-1.0.0.tar.gz.

File metadata

File hashes

Hashes for django_basic_auth_decorator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 667910ff683ae79a8ef85912cc6e1760abaebea4adfe47443f46ea795f2e7802
MD5 8af2f9517429f030ad57f9ae91a06bd4
BLAKE2b-256 e2ff9df536cd356fb149606f6c161d9ecdb969293b3faa922779b88749aadb91

See more details on using hashes here.

File details

Details for the file django_basic_auth_decorator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_basic_auth_decorator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed803b64e321fae8908d64f8f917d7a5d516857998aff27ad49c361af2c9e1ab
MD5 30f5929a8bf0dddb0f2624987f14ef13
BLAKE2b-256 f90d872cbdd9a24e195fbd744556c98a437a3065860d5a6da1cb16cdc33db10e

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