Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Decorator to provide Basic Authentication for Django Views

Project description

What

This is a decorator for a django view that will request Basic Authentication. This is a copy of https://djangosnippets.org/snippets/243/

Why

There are serveral reasons for this Package:

  • I wanted Basic Authentication for just a couple of views. So the RemoteUserAuthBackend was no option. Also I did not want to configure the webserver to do Basic Authentication.
  • As you can read in the comments of https://djangosnippets.org/snippets/243/ there are some bugs in it - so I wanted to have them fixed - but also documented that they were fixed and in the end provide a fixed version of it
  • Also I just want to install it via pip

How to use

Apache

Add this to your apache config to tell apache to pass the Authorication Headers to your application:

WSGIPassAuthorization On

Project details


Release history Release notifications

This version
History Node

0.9

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-basic-authentication-decorator-0.9.tar.gz (2.6 kB) Copy SHA256 hash SHA256 Source None Apr 20, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page