зеркало из https://github.com/mozilla/FlightDeck.git
auth_db_authenticate method removed
This commit is contained in:
Родитель
a3653c1bee
Коммит
4b999f0b65
|
@ -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):
|
||||
"""
|
||||
|
|
Загрузка…
Ссылка в новой задаче