mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Strip out unneeded and not working API calls, replaced with ServiceLogin call (no OAuth).
This commit is contained in:
21
api/urls.py
21
api/urls.py
@@ -1,27 +1,18 @@
|
||||
from django.conf.urls.defaults import *
|
||||
from piston.resource import Resource
|
||||
from piston.authentication import HttpBasicAuthentication, OAuthAuthentication
|
||||
from piston.authentication import HttpBasicAuthentication, OAuthAuthentication, NoAuthentication
|
||||
|
||||
from api.handlers import *
|
||||
|
||||
auth = OAuthAuthentication()
|
||||
#auth = HttpBasicAuthentication(realm="Auth API")
|
||||
ad = { 'authentication': auth }
|
||||
#ad = {}
|
||||
oauth = { 'authentication': OAuthAuthentication() }
|
||||
noauth = { 'authentication': NoAuthentication() }
|
||||
|
||||
user_resource = Resource(handler=UserHandler, **ad)
|
||||
login_resource = Resource(handler=LoginHandler, **ad)
|
||||
logout_resource = Resource(handler=LogoutHandler, **ad)
|
||||
access_resource = Resource(handler=AccessHandler, **ad)
|
||||
user_resource = Resource(handler=UserHandler, **oauth)
|
||||
servicelogin_resource = Resource(handler=ServiceLoginHandler, **noauth)
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^login/$', login_resource),
|
||||
url(r'^logout/$', logout_resource),
|
||||
url(r'^access/$', access_resource),
|
||||
url(r'^user/$', user_resource),
|
||||
# url(r'^user/(?P<id>\d+)/$', user_resource),
|
||||
# url(r'^serviceaccount/$', serviceaccount_resource),
|
||||
# url(r'^serviceaccount/(?P<id>\d+)/$', serviceaccount_resource),
|
||||
url(r'^servicelogin/$', servicelogin_resource),
|
||||
)
|
||||
|
||||
urlpatterns += patterns('piston.authentication',
|
||||
|
||||
Reference in New Issue
Block a user