Add a method to allow checking if a token exists for a particular host
parent
58592d4094
commit
faf1375db6
|
|
@ -156,6 +156,13 @@ void JsonRpcClient::acceptCertificate(const QString &serverUuid, const QByteArra
|
|||
storePem(serverUuid, pem);
|
||||
}
|
||||
|
||||
bool JsonRpcClient::tokenExists(const QString &serverUuid) const
|
||||
{
|
||||
QSettings settings;
|
||||
settings.beginGroup("jsonTokens");
|
||||
return settings.contains(QUuid(serverUuid).toString());
|
||||
}
|
||||
|
||||
void JsonRpcClient::getCloudConnectionStatus()
|
||||
{
|
||||
JsonRpcReply *reply = createReply("JSONRPC.IsCloudConnected", QVariantMap(), this, "isCloudConnectedReply");
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ public:
|
|||
Q_INVOKABLE void connectToHost(NymeaHost *host, Connection *connection = nullptr);
|
||||
Q_INVOKABLE void disconnectFromHost();
|
||||
Q_INVOKABLE void acceptCertificate(const QString &serverUuid, const QByteArray &pem);
|
||||
Q_INVOKABLE bool tokenExists(const QString &serverUuid) const;
|
||||
|
||||
Q_INVOKABLE bool ensureServerVersion(const QString &jsonRpcVersion);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue