From d098a1ae28d9a55f222f9a245951a1bfb4ebbdda Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 22 Aug 2016 10:50:39 -0700 Subject: [PATCH] allow temporary domains to use an access token when present --- domain-server/src/DomainServer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index d5f23f7c4e..cbf533bf64 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -118,8 +118,8 @@ DomainServer::DomainServer(int argc, char* argv[]) : setupNodeListAndAssignments(); - if (_type == MetaverseDomain) { - // if we have a metaverse domain, we'll need an access token to heartbeat handle auto-networking + if (_type != NonMetaverse) { + // if we have a metaverse domain, we'll use an access token for API calls resetAccountManagerAccessToken(); } @@ -469,8 +469,8 @@ bool DomainServer::resetAccountManagerAccessToken() { if (accessTokenVariant && accessTokenVariant->canConvert(QMetaType::QString)) { accessToken = accessTokenVariant->toString(); } else { - qDebug() << "A domain-server feature that requires authentication is enabled but no access token is present."; - qDebug() << "Set an access token via the web interface, in your user or master config" + qWarning() << "No access token is present. Some operations that use the metaverse API will fail."; + qDebug() << "Set an access token via the web interface, in your user config" << "at keypath metaverse.access_token or in your ENV at key DOMAIN_SERVER_ACCESS_TOKEN"; // clear any existing access token from AccountManager @@ -480,7 +480,7 @@ bool DomainServer::resetAccountManagerAccessToken() { } } else { qDebug() << "Using access token from DOMAIN_SERVER_ACCESS_TOKEN in env. This overrides any access token present" - << " in the user or master config."; + << " in the user config."; } // give this access token to the AccountManager