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")
```
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 | RSS feed
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-http-authentication-0.0.1.tar.gz
.
File metadata
- Download URL: django-http-authentication-0.0.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22f5cdb8d74b76f6ee4c291f4b77b7c05af9e08b6c793fc027578b76458ca6d7 |
|
MD5 | ab5ca7ce92256d2ed68ae7257306532e |
|
BLAKE2b-256 | 0ce6a328c834ce1f135cb4cb731143bb0989d56f4774e17972648e3a15cf6a49 |