diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-03-27 16:06:23 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-03-27 16:07:39 -0400 |
commit | acd9aeca8e697b6d1f8f7ac29d7e3afac07b2e8a (patch) | |
tree | dbb232a017f71934cfb05b264db0cca40ac00164 /forum_modules/oauthauth/authentication.py | |
parent | 40ea3f482ffdfd648366ed20a87335dc31e92231 (diff) | |
download | askbot-acd9aeca8e697b6d1f8f7ac29d7e3afac07b2e8a.tar.gz askbot-acd9aeca8e697b6d1f8f7ac29d7e3afac07b2e8a.tar.bz2 askbot-acd9aeca8e697b6d1f8f7ac29d7e3afac07b2e8a.zip |
removed authentication module to be replaced with a dedicated app, also switched to table layout for openid signin template temporarily so that it works on IE7 and maybe earlier
Diffstat (limited to 'forum_modules/oauthauth/authentication.py')
-rwxr-xr-x | forum_modules/oauthauth/authentication.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/forum_modules/oauthauth/authentication.py b/forum_modules/oauthauth/authentication.py deleted file mode 100755 index 04145461..00000000 --- a/forum_modules/oauthauth/authentication.py +++ /dev/null @@ -1,41 +0,0 @@ -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 oauth -import settings - -class TwitterAuthConsumer(OAuthAbstractAuthConsumer): - def __init__(self): - OAuthAbstractAuthConsumer.__init__(self, - settings.TWITTER_CONSUMER_KEY, - settings.TWITTER_CONSUMER_SECRET, - "twitter.com", - "https://twitter.com/oauth/request_token", - "https://twitter.com/oauth/access_token", - "https://twitter.com/oauth/authorize", - ) - - def get_user_data(self, key): - json = self.fetch_data(key, "https://twitter.com/account/verify_credentials.json") - - if 'screen_name' in json: - creds = simplejson.loads(json) - - return { - 'username': creds['screen_name'] - } - - - return {} - -class TwitterAuthContext(ConsumerTemplateContext): - mode = 'BIGICON' - type = 'DIRECT' - weight = 150 - human_name = 'Twitter' - icon = '/media/images/openid/twitter.png'
\ No newline at end of file |