fix login
This commit is contained in:
parent
1b802f9b6b
commit
6157c68c30
@ -47,11 +47,14 @@ class Authetication:
|
||||
try:
|
||||
b64pwd = b64encode(SHA256.new(password.encode('utf-8')).digest())
|
||||
bcrypt_check(b64pwd, user['password'].encode('utf-8'))
|
||||
auth_logger.debug("User logged in: " + username)
|
||||
return user['homeDir']
|
||||
except ValueError:
|
||||
auth_logger.debug("User NOT logged in: " + username)
|
||||
return ''
|
||||
auth_logger.debug("User logged in: " + username)
|
||||
return user['homeDir']
|
||||
else:
|
||||
auth_logger.error("User not found")
|
||||
return ''
|
||||
|
||||
def checkUserExists(self, username: str) -> bool:
|
||||
with open(self.CONFIG_FILE_LOCATION) as json_file:
|
||||
|
Loading…
Reference in New Issue
Block a user