コード例 #1
0
ファイル: server.py プロジェクト: auready/glances
 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
コード例 #2
0
 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
コード例 #3
0
 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
コード例 #4
0
ファイル: glances_bottle.py プロジェクト: yutiansut/glances
 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