# 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")
```
Metadata
Release files for django-http-authentication 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-http-authentication-0.0.1.tar.gz | 2.6 kB | Details |
Release files / django-http-authentication-0.0.1.tar.gz
| Download URL | django-http-authentication-0.0.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22f5cdb8d74b76f6ee4c291f4b77b7c05af9e08b6c793fc027578b76458ca6d7
|
|
BLAKE2b-256 checksum How to use checksums |
0ce6a328c834ce1f135cb4cb731143bb0989d56f4774e17972648e3a15cf6a49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |