]> git.openstreetmap.org Git - osqa.git/blobdiff - forum_modules/facebookauth/authentication.py
Migrate to Django 1.6
[osqa.git] / forum_modules / facebookauth / authentication.py
index 8562bad60a2853649239daeb7a5b00a15cd4f40a..b80c47767ff08846e8b49e960e6c675d30bf5871 100644 (file)
@@ -12,14 +12,8 @@ from django.utils.translation import ugettext as _
 
 import settings
 
 
 import settings
 
-try:
-    from json import load as load_json
-except Exception:
-    from django.utils.simplejson import JSONDecoder
+from json import load as load_json
 
 
-    def load_json(json):
-        decoder = JSONDecoder()
-        return decoder.decode(json.read())
 
 class FacebookAuthConsumer(AuthenticationConsumer):
 
 
 class FacebookAuthConsumer(AuthenticationConsumer):
 
@@ -33,7 +27,7 @@ class FacebookAuthConsumer(AuthenticationConsumer):
         facebook_api_authentication_url = "https://graph.facebook.com/oauth/authorize?" + urlencode(args)
 
         return facebook_api_authentication_url
         facebook_api_authentication_url = "https://graph.facebook.com/oauth/authorize?" + urlencode(args)
 
         return facebook_api_authentication_url
-    
+
     def process_authentication_request(self, request):
         try:
             args = dict(client_id=settings.FB_API_KEY, redirect_uri="%s%s" % (django_settings.APP_URL, request.path))
     def process_authentication_request(self, request):
         try:
             args = dict(client_id=settings.FB_API_KEY, redirect_uri="%s%s" % (django_settings.APP_URL, request.path))