mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
generate a new keypair on every interface launch
This commit is contained in:
parent
7cb8cbfdd4
commit
5ecdb58e20
3 changed files with 4 additions and 9 deletions
|
@ -278,6 +278,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
|||
|
||||
connect(&accountManager, &AccountManager::authRequired, Menu::getInstance(), &Menu::loginForCurrentDomain);
|
||||
connect(&accountManager, &AccountManager::usernameChanged, this, &Application::updateWindowTitle);
|
||||
|
||||
// once we have a profile in account manager make sure we generate a new keypair
|
||||
connect(&accountManager, &AccountManager::profileChanged, &accountManager, &AccountManager::generateNewKeypair);
|
||||
|
||||
// set the account manager's root URL and trigger a login request if we don't have the access token
|
||||
accountManager.setAuthURL(DEFAULT_NODE_AUTH_URL);
|
||||
|
|
|
@ -146,12 +146,6 @@ void AccountManager::setAuthURL(const QUrl& authURL) {
|
|||
} else {
|
||||
requestProfile();
|
||||
}
|
||||
|
||||
// if we don't have a private key in settings we should generate a new keypair
|
||||
if (!_accountInfo.hasPrivateKey()) {
|
||||
qDebug() << "No private key present - generating a new key-pair.";
|
||||
generateNewKeypair();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -427,7 +421,6 @@ void AccountManager::requestAccessTokenFinished() {
|
|||
persistAccountToSettings();
|
||||
|
||||
requestProfile();
|
||||
generateNewKeypair();
|
||||
}
|
||||
} else {
|
||||
// TODO: error handling
|
||||
|
|
|
@ -80,6 +80,7 @@ public slots:
|
|||
void logout();
|
||||
void updateBalance();
|
||||
void accountInfoBalanceChanged(qint64 newBalance);
|
||||
void generateNewKeypair();
|
||||
signals:
|
||||
void authRequired();
|
||||
void authEndpointChanged();
|
||||
|
@ -102,8 +103,6 @@ private:
|
|||
|
||||
void passSuccessToCallback(QNetworkReply* reply);
|
||||
void passErrorToCallback(QNetworkReply* reply);
|
||||
|
||||
void generateNewKeypair();
|
||||
|
||||
Q_INVOKABLE void invokedRequest(const QString& path,
|
||||
bool requiresAuthentication,
|
||||
|
|
Loading…
Reference in a new issue