Simple Key authentication for Django.Based on github.com/scoursen/django-apikey
Project description
Key authentication for django. Can be used with django-piston easily.
Based on https://github.com/scoursen/django-apikey.
Installation
pip install django-apikey
Configuration
Add ‘apikey’ to your settings.py:
INSTALLED_APPS = ( ... 'apikey', .... )
You can change the authorization header by setting the APIKEY_AUTHORIZATION_HEADER in settings.py:
APIKEY_AUTHORIZATION_HEADER = 'App-Authorization'
To add api authentication with piston do thisin your handlers.
from apikey.auth import ApiKeyAuthentication from piston.handler import BaseHandler from piston.resource import Resource from myapp.models import Item class ItemHandler(BaseHandler): allowed = ('GET', ) model = Item def read(self): return Item.objects.all() handler = Resource( handler=ItemHandler, authentication=ApiKeyAuthentication())
Thanks
This project is base on the one of Steve Course https://github.com/scoursen/django-apikey but with several simplifications.
License
This software is licensed under the New BSD License.
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
django-apikey-0.1.6.tar.gz
(2.2 kB
view details)
File details
Details for the file django-apikey-0.1.6.tar.gz
.
File metadata
- Download URL: django-apikey-0.1.6.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d408e261f20117cd253d21b8d5017e132d80c79738aeb6db5556544c6a63925e |
|
MD5 | 80983af36fe54c2fbbb55d8ee403703e |
|
BLAKE2b-256 | a4f952b2d7f27d410bab9090b25f071d1772a553d1c19bccb89905624ca98efc |