Moves create member to separate resource.

* Adds CORS support

Tests are failing
This commit is contained in:
nikolark committed 2013-11-24 01:52:29 +01:00
1 parent cacc1b1b94
commit 7bba5770e8
8 files changed
+136 -36

No files matched your search

+14 -1
View File
@@ -1,6 +1,8 @@
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authentication import ApiKeyAuthentication, Authentication
from tastypie.http import HttpUnauthorized
# TODO replace with Oauth2 http://django-tastypie.readthedocs.org/en/latest/cookbook.html#creating-a-full-oauth-2-0-api
class MyApiKeyAuthentication(ApiKeyAuthentication):
"""
Override method below to use our custom User model
@@ -40,3 +42,14 @@ class MyApiKeyAuthentication(ApiKeyAuthentication):
request.user = user
return key_auth_check
class ServiceAuthentication(Authentication):
pass
#
# TODO auth for services
#
#def is_authenticated(self, request, **kwargs):
# return True
# return False