mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-24 09:04:23 +02:00
Send domain metadata for authed domains
This commit is contained in:
parent
6ed972257f
commit
1ce9e96cba
1 changed files with 13 additions and 3 deletions
|
@ -108,6 +108,9 @@ DomainServer::DomainServer(int argc, char* argv[]) :
|
||||||
connect(&_settingsManager, &DomainServerSettingsManager::updateNodePermissions,
|
connect(&_settingsManager, &DomainServerSettingsManager::updateNodePermissions,
|
||||||
&_gatekeeper, &DomainGatekeeper::updateNodePermissions);
|
&_gatekeeper, &DomainGatekeeper::updateNodePermissions);
|
||||||
|
|
||||||
|
// update the metadata with current descriptors
|
||||||
|
_metadata.setDescriptors(_settingsManager.getSettingsMap());
|
||||||
|
|
||||||
if (optionallyReadX509KeyAndCertificate() && optionallySetupOAuth()) {
|
if (optionallyReadX509KeyAndCertificate() && optionallySetupOAuth()) {
|
||||||
// we either read a certificate and private key or were not passed one
|
// we either read a certificate and private key or were not passed one
|
||||||
// and completed login or did not need to
|
// and completed login or did not need to
|
||||||
|
@ -122,10 +125,17 @@ DomainServer::DomainServer(int argc, char* argv[]) :
|
||||||
_gatekeeper.preloadAllowedUserPublicKeys();
|
_gatekeeper.preloadAllowedUserPublicKeys();
|
||||||
|
|
||||||
optionallyGetTemporaryName(args);
|
optionallyGetTemporaryName(args);
|
||||||
}
|
|
||||||
|
|
||||||
// update the metadata with current descriptors
|
// send metadata descriptors
|
||||||
_metadata.setDescriptors(_settingsManager.getSettingsMap());
|
QString domainUpdateJSON = QString("{\"domain\":%1}").arg(QString(QJsonDocument(_metadata.getDescriptors()).toJson(QJsonDocument::Compact)));
|
||||||
|
const QUuid& domainID = DependencyManager::get<LimitedNodeList>()->getSessionUUID();
|
||||||
|
static const QString DOMAIN_UPDATE = "/api/v1/domains/%1";
|
||||||
|
DependencyManager::get<AccountManager>()->sendRequest(DOMAIN_UPDATE.arg(uuidStringWithoutCurlyBraces(domainID)),
|
||||||
|
AccountManagerAuth::Required,
|
||||||
|
QNetworkAccessManager::PutOperation,
|
||||||
|
JSONCallbackParameters(),
|
||||||
|
domainUpdateJSON.toUtf8());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DomainServer::~DomainServer() {
|
DomainServer::~DomainServer() {
|
||||||
|
|
Loading…
Reference in a new issue