Basic auth utilities for Django.
Project description
Basic auth utilities for Django.
Requires
Tested under…
Python
2.7
3.6
Django
1.8
1.10
1.11
Installation
pip install django-basicauth
Usage
from basicauth.decorators import basic_auth_required
@basic_auth_required
def myview(request):
...
or by a middleware.
MIDDLEWARE_CLASSES = (
'basicauth.middleware.BasicAuthMiddleware',
...
)
Settings
BASICAUTH_USERS (required): Dictionary including keys as username and values as passwords.
BASICAUTH_REALM: realm string, default is “Secure resource”.
BASICAUTH_DISABLE: Disable all of barriers by this library.
Changes
0.4 (2017-09-30)
Supported Python 2.7
Dropped Django1.9
Supported Django 1.10+ style middleware
0.3 (2017-08-28)
Added BASICAUTH_DISABLE setting
- Changed API of basicauthutils.validate_request
Fixed to return True/False
Adding REMOTE_USER by this function
0.2.1 (2017-08-28)
Officially supported Django 1.11, 1.10, 1.9
0.2 (2016-03-31)
Added BasicAuthMiddleware https://github.com/hirokiky/django-basicauth/pull/3
0.1 (2015-04-20)
Initial
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-basicauth-0.4.tar.gz.
File metadata
- Download URL: django-basicauth-0.4.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23f514657eed86aab2762942f744aea2323968521be0271c8772eecc5da2db1f
|
|
| MD5 |
1ff2bcdfbd43b761af14894c0ef64841
|
|
| BLAKE2b-256 |
0d25e6be7c38f65fbd1b47eaba073bb3fbcb7919c0e1b4c815e405fd38a788e4
|
File details
Details for the file django_basicauth-0.4-py3-none-any.whl.
File metadata
- Download URL: django_basicauth-0.4-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f54d135c035deb12efac050847defb5395be4cd1e75140dab6ee815a7bc2021c
|
|
| MD5 |
21de9f2dbb73b3cdaf43f969a181c0d4
|
|
| BLAKE2b-256 |
97ac9dccafe3070304b56c14ebc9a6d8c2e1448eec55dee38f3f4b22fce94e6b
|