use hashed password function for authentification
This commit is contained in:
parent
4dc47e547a
commit
3dd3e3e310
4
auth.py
4
auth.py
|
@ -10,10 +10,10 @@ def get_credentials():
|
|||
return (username, password)
|
||||
|
||||
def authenticate(username, password, pwdb):
|
||||
return password == pwdb[username]
|
||||
return hash_password(password) == pwdb[username]
|
||||
|
||||
def add_user(username, pwdb):
|
||||
pwdb[username] = input(f'Enter password for {username}: ')
|
||||
pwdb[username] = hash_password(input(f'Enter password for {username}: '))
|
||||
return pwdb
|
||||
|
||||
def read_pwdb(PWDB_PATH):
|
||||
|
|
Loading…
Reference in a new issue