auth_db_authenticate method removed

This commit is contained in:
Piotr Zalewa 2012-03-15 19:05:18 +01:00
Родитель a3653c1bee
Коммит 4b999f0b65
1 изменённых файлов: 1 добавлений и 20 удалений

Просмотреть файл

@ -39,7 +39,7 @@ class AMOAuthentication:
return None
except User.DoesNotExist:
# username does not exist in FD database
user = None
return None
return None
def get_user(self, user_id):
@ -48,25 +48,6 @@ class AMOAuthentication:
except User.DoesNotExist:
return None
def auth_db_authenticate(self, username, password):
" authenticate email/password pair in AMO database "
user_data = AMOAuthentication.fetch_amo_user(username)
if '$' not in user_data['password']:
valid = (get_hexdigest('md5', '',
password) == user_data['password'])
else:
algo, salt, hsh = user_data['password'].split('$')
valid = (hsh == get_hexdigest(algo, salt, password))
if not valid:
return None
username = user_data['id']
self.user_data = user_data
return username
@staticmethod
def auth_browserid_authenticate(email):
"""