forked from scoursen/django-apikey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
26 lines (15 loc) · 715 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
django-apikey
Simple, straight forward API key authentication for django-piston.
Requirements:
django-piston
a User profile that has the following 2 methods:
can_make_api_key( ), returns True is the current user can create another API key.
available_keys( ), the number of keys that current user can create.
There is a simple template file in templates/keys.html. This file is used
by all the project's views.
To use django-apikey with django-piston:
from key.auth import ApiKeyAuthentication
auth = ApiKeyAuthentication( )
bucket_handler = Resource( handler=MyHandler, authentication=auth )
Clients use the Authorization header to pass the API key:
headers['Authorization'] = 'your.api.key.here'