Spaces:
Sleeping
Sleeping
Update users_management.py
Browse files- users_management.py +1 -2
users_management.py
CHANGED
@@ -82,9 +82,8 @@ def update_json(user, prompt, keywords):
|
|
82 |
|
83 |
def auth_user(username, password):
|
84 |
print('INSIDE')
|
85 |
-
print(f"HASHED = {sha256(password.encode()).hexdigest() == users[username]['hashed_password']}")
|
86 |
if username in users and sha256(password.encode()).hexdigest() == users[username]['hashed_password']:
|
87 |
-
#mistral_api_key = os.environ[username]
|
88 |
user = users.get(username)
|
89 |
else:
|
90 |
username = 'Guest'
|
|
|
82 |
|
83 |
def auth_user(username, password):
|
84 |
print('INSIDE')
|
85 |
+
print(f"HASHED = {sha256(password.encode()).hexdigest() == users[username]['hashed_password']}\nusername={username}\nusers = {users}")
|
86 |
if username in users and sha256(password.encode()).hexdigest() == users[username]['hashed_password']:
|
|
|
87 |
user = users.get(username)
|
88 |
else:
|
89 |
username = 'Guest'
|