def _new_account(self): name = input("Name: ") password = getpass.getpass("Password: "******"Invalid arguments.") return account = AccountManager.create_account(name, password) if account: print("Account created.") else: print("Account couldn't be created.")
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