Esempio n. 1
0
 def _process_account(self):
     """ Check if the account received can log to the server. """
     account = AccountManager.get_account(self.account_name)
     if account is not None and account.is_valid():
         self.conn.account = account
         self.conn.srp.generate_server_ephemeral(account.srp_verifier_as_int)
         response = self._get_success_response()
         return LoginConnectionState.SENT_CHALL, response
     else:
         LOG.warning("Invalid account {} tried to login".format(
             self.account_name
         ))
         response = self._get_failure_response(account)
         return LoginConnectionState.CLOSED, response
Esempio n. 2
0
 def _process_account(self):
     """ Check if the account received can log to the server. """
     account = AccountManager.get_account(self.account_name)
     if account is not None and account.is_valid():
         self.conn.account = account
         self.conn.srp.generate_server_ephemeral(account.srp_verifier_as_int)
         response = self._get_success_response()
         return LoginConnectionState.SENT_CHALL, response
     else:
         LOG.warning("Invalid account {} tried to login".format(
             self.account_name
         ))
         response = self._get_failure_response(account)
         return LoginConnectionState.CLOSED, response