mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Auth via API key, also added Admin interface to edit keys
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user