Define default user and password as constants

This commit is contained in:
LordGrey
2024-03-17 19:33:30 +01:00
parent 0ee637e56d
commit 7dccad35aa
4 changed files with 17 additions and 10 deletions

View File

@@ -36,13 +36,13 @@ AuthManager::AuthManager(QObject *parent, bool readonlyMode)
connect(_authBlockTimer, &QTimer::timeout, this, &AuthManager::checkAuthBlockTimeout);
// init with default user and password
if (!_authTable->userExist("Hyperion"))
if (!_authTable->userExist(hyperion::DEFAULT_USER))
{
_authTable->createUser("Hyperion", "hyperion");
_authTable->createUser(hyperion::DEFAULT_USER, hyperion::DEFAULT_PASSWORD);
}
// update Hyperion user token on startup
_authTable->setUserToken("Hyperion");
_authTable->setUserToken(hyperion::DEFAULT_USER);
}
AuthManager::AuthDefinition AuthManager::createToken(const QString &comment)