Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theskumar/django-auth-wall
Easily put your django site behind a layer of Basic Authentication, for protecting the staging/testing servers
https://github.com/theskumar/django-auth-wall
authentication django
Last synced: 16 days ago
JSON representation
Easily put your django site behind a layer of Basic Authentication, for protecting the staging/testing servers
- Host: GitHub
- URL: https://github.com/theskumar/django-auth-wall
- Owner: theskumar
- Created: 2015-11-05T13:33:01.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-04-26T20:56:28.000Z (over 2 years ago)
- Last Synced: 2024-10-11T21:53:59.740Z (about 1 month ago)
- Topics: authentication, django
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# django-auth-wall
[![Latest PyPI version](https://img.shields.io/pypi/v/django-auth-wall.svg)](https://pypi.python.org/pypi/django-auth-wall)
A very basic Basic Auth middleware that uses a username/password defined
in your environment variable or settings.py to protect whole of your
site. Does not use Django auth.Handy for quickly securing an entire site during development, for
example.**Note**: Environment variables is preferred over `settings.py`.
# Usage
```
# In settings.py:MIDDLEWARE = [
'django_auth_wall.middleware.BasicAuthMiddleware',# all other middleware here
]# Optionally, set it here if not setting as environment variable
# Requires both variable to be set, else site won't be protected.
AUTH_WALL_USERNAME = 'user'
AUTH_WALL_PASSWORD = 'pass'
```# Installation
```shell
pip install django-auth-wall
```**Warning**
Please make sure that you use SSL/TLS (HTTPS) to encrypt the connection
between the client and the server, when using basic access
authentication. In basic access authentication username and password are
sent in cleartext, and if SSL/TLS is not used, the credentials could be
easily intercepted.# Compatibility
- Django 1.5+
# Licence
MIT
# Authors
[django-auth-wall] was written by [Saurabh Kumar](https://github.com/theskumar).