Skip to main content

A django application that adds decorators to allow authentication via HTTP_AUTHORIZATION.

Project description

# django-http-authorization

This django app adds decorators that fall back to a HTTP_AUTHORIAZATION instead of a django login form.
This can be used for programs that want to interact with your web page but require login.
E. g. to download a password protected file via wget or access an internal icalendar.

The HTTP_AUTHORIZATION relys on `django.contrib.auth.authenticate`.

## Usage

Import the decorators
```
from http_authentication.decorators import http_authorization_staff_member_required, http_authorization_login_required
```
and add it to the view functions
```
@http_authorization_staff_member_required
def protected_view(request):
return HttpResponse("This page can also be accessed via HTTP_AUTHORIZATION")

```

Project details


Release history Release notifications

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-http-authentication-0.0.1.tar.gz (2.6 kB) Copy SHA256 hash SHA256 Source None

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