allow temporary domains to use an access token when present

This commit is contained in:
Stephen Birarda 2016-08-22 10:50:39 -07:00
parent 60210c323f
commit d098a1ae28

View file

@ -118,8 +118,8 @@ DomainServer::DomainServer(int argc, char* argv[]) :
setupNodeListAndAssignments(); setupNodeListAndAssignments();
if (_type == MetaverseDomain) { if (_type != NonMetaverse) {
// if we have a metaverse domain, we'll need an access token to heartbeat handle auto-networking // if we have a metaverse domain, we'll use an access token for API calls
resetAccountManagerAccessToken(); resetAccountManagerAccessToken();
} }
@ -469,8 +469,8 @@ bool DomainServer::resetAccountManagerAccessToken() {
if (accessTokenVariant && accessTokenVariant->canConvert(QMetaType::QString)) { if (accessTokenVariant && accessTokenVariant->canConvert(QMetaType::QString)) {
accessToken = accessTokenVariant->toString(); accessToken = accessTokenVariant->toString();
} else { } else {
qDebug() << "A domain-server feature that requires authentication is enabled but no access token is present."; 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 or master config" 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"; << "at keypath metaverse.access_token or in your ENV at key DOMAIN_SERVER_ACCESS_TOKEN";
// clear any existing access token from AccountManager // clear any existing access token from AccountManager
@ -480,7 +480,7 @@ bool DomainServer::resetAccountManagerAccessToken() {
} }
} else { } else {
qDebug() << "Using access token from DOMAIN_SERVER_ACCESS_TOKEN in env. This overrides any access token present" 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 // give this access token to the AccountManager