X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/7b6ad329b55c67f72bd2008e83b5c092c437a8b5..48da83177329ce1b7d3dfcfc83600e067120c7e2:/forum_modules/oauthauth/authentication.py diff --git a/forum_modules/oauthauth/authentication.py b/forum_modules/oauthauth/authentication.py index 54a6b4f..d353de4 100644 --- a/forum_modules/oauthauth/authentication.py +++ b/forum_modules/oauthauth/authentication.py @@ -1,11 +1,8 @@ +import json + from consumer import OAuthAbstractAuthConsumer from forum.authentication.base import ConsumerTemplateContext -try: - import json as simplejson -except ImportError: - from django.utils import simplejson - from lib import oauth2 import settings @@ -24,7 +21,7 @@ class TwitterAuthConsumer(OAuthAbstractAuthConsumer): json = self.fetch_data(key, "https://twitter.com/account/verify_credentials.json") if 'screen_name' in json: - creds = simplejson.loads(json) + creds = json.loads(json) return { 'username': creds['screen_name'] @@ -38,4 +35,4 @@ class TwitterAuthContext(ConsumerTemplateContext): type = 'DIRECT' weight = 150 human_name = 'Twitter' - icon = '/media/images/openid/twitter.png' \ No newline at end of file + icon = '/media/images/openid/twitter.png'