Skip to main content

Puts your staging site behind a basic auth layer.

Project description

Latest PyPI version Latest Travis CI build status

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

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.

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-auth-wall-0.2.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

django_auth_wall-0.2.0-py2.py3-none-any.whl (5.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-auth-wall-0.2.0.tar.gz.

File metadata

File hashes

Hashes for django-auth-wall-0.2.0.tar.gz
Algorithm Hash digest
SHA256 16e922d75e3431e9c7e33e9b7a6bdf9d89307b172aaa2e7c4b629143553f511a
MD5 dbdac668dc16dc0394188306f9565c3a
BLAKE2b-256 870b3c6dcc687d306dfc3ad0653ad9dc280c0eff9260ed2b19129b027c5dab97

See more details on using hashes here.

File details

Details for the file django_auth_wall-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_auth_wall-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 dd46a06a9412185aad2cc20203297fa72c3c1047485ec81f7ee6a03486be7779
MD5 b0d4a3e83df2922c479c1ca376c80c94
BLAKE2b-256 d8aadcb44fb7b49e013d5af9125141472e166dba11125a044655f85d7eac55ac

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page