Skip to main content

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 | RSS feed

This version

0.9

Download files

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

Source Distribution

File details

Details for the file django-basic-authentication-decorator-0.9.tar.gz.

File metadata

File hashes

Hashes for django-basic-authentication-decorator-0.9.tar.gz
Algorithm Hash digest
SHA256 deb7fdb033f46ddf0df5cb039eb365127c13ca076684dc2380f8c5be025a998d
MD5 f76f63ba1cf2fc90f964d97a4b8628ed
BLAKE2b-256 5b1bb754b5ceb34e79b4c91700a208be69ae499f11e09522c1905d138edc7e0c

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