def check_user(self, username, password): # Check username and password in the dictionary if username in self.server.user_dict: from glances.password import GlancesPassword pwd = GlancesPassword() return pwd.check_password(self.server.user_dict[username], password) else: return False
def check_auth(self, username, password): """Check if a username/password combination is valid.""" if username == self.args.username: from glances.password import GlancesPassword pwd = GlancesPassword() return pwd.check_password(self.args.password, pwd.sha256_hash(password)) else: return False
def check_user(self, username, password): # Check username and password in the dictionary if username in self.server.user_dict: from glances.password import GlancesPassword pwd = GlancesPassword() return pwd.check_password(self.server.user_dict[username], password) else: return False
def check_auth(self, username, password): """Check if a username/password combination is valid.""" if username == self.args.username: from glances.password import GlancesPassword pwd = GlancesPassword() return pwd.check_password(self.args.password, pwd.sha256_hash(password)) else: return False