Skip to main content

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):
    ...

# Use a different realm for each set of credentials, otherwise browsers
# reuse the cached credentials of one view on the other and prompt again
@basic_auth(OTHER_CREDENTIALS, realm="Internal Docs")
def other_view(request):
    ...

License

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

Metadata

Release files for django-basic-auth-decorator 1.1.0

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

Source distribution (sdist)

Source distribution for django-basic-auth-decorator 1.1.0
File Size Uploaded Provenance
django_basic_auth_decorator-1.1.0.tar.gz 3.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-basic-auth-decorator 1.1.0
File Interpreter ABI Platform
django_basic_auth_decorator-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / django_basic_auth_decorator-1.1.0.tar.gz

Download URL django_basic_auth_decorator-1.1.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a3b945f950fb11d68d187b24cf03bb8bc55aba951de963a5ef8f71920e656a6c
BLAKE2b-256 checksum
How to use checksums
57e92320fe9eec874c61b636eaeeb211c45eefee8f2106dc7292991e49b8a9bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / django_basic_auth_decorator-1.1.0-py3-none-any.whl

Download URL django_basic_auth_decorator-1.1.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0fd454a5d01666ed7b821f8d55394880a7d4d330eb7385bbd0f11f7b827d271c
BLAKE2b-256 checksum
How to use checksums
29d649a0bf6bf9163fc98d081378d5aea6a9caa586a65b2d1310475e03a5d7fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for django-basic-auth-decorator 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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