Auth via API key, also added Admin interface to edit keys

This commit is contained in:
2010-06-15 21:05:53 +01:00
parent 7d90ddaec0
commit 78ca607608
4 changed files with 58 additions and 4 deletions

View File

@@ -2,14 +2,16 @@ from django.conf.urls.defaults import *
from piston.resource import Resource
from piston.authentication import HttpBasicAuthentication, OAuthAuthentication, NoAuthentication
from api.auth import APIKeyAuthentication
from api.handlers import *
oauth = { 'authentication': OAuthAuthentication() }
noauth = { 'authentication': NoAuthentication() }
apikeyauth = { 'authentication': APIKeyAuthentication() }
user_resource = Resource(handler=UserHandler, **oauth)
login_resource = Resource(handler=LoginHandler, **noauth)
eveapi_resource = Resource(handler=EveAPIHandler, **noauth)
eveapi_resource = Resource(handler=EveAPIHandler, **apikeyauth)
urlpatterns = patterns('',
url(r'^user/$', user_resource),