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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 django_basic_auth_decorator-1.0.0.tar.gz.
File metadata
- Download URL: django_basic_auth_decorator-1.0.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
667910ff683ae79a8ef85912cc6e1760abaebea4adfe47443f46ea795f2e7802
|
|
| MD5 |
8af2f9517429f030ad57f9ae91a06bd4
|
|
| BLAKE2b-256 |
e2ff9df536cd356fb149606f6c161d9ecdb969293b3faa922779b88749aadb91
|
File details
Details for the file django_basic_auth_decorator-1.0.0-py3-none-any.whl.
File metadata
- Download URL: django_basic_auth_decorator-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed803b64e321fae8908d64f8f917d7a5d516857998aff27ad49c361af2c9e1ab
|
|
| MD5 |
30f5929a8bf0dddb0f2624987f14ef13
|
|
| BLAKE2b-256 |
f90d872cbdd9a24e195fbd744556c98a437a3065860d5a6da1cb16cdc33db10e
|