Implement authentication logging and include username in domain connect request
This commit is contained in:
@@ -169,6 +169,14 @@ bool OverteClient::login(const std::string& username, const std::string& passwor
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OverteClient::setAuth(OverteAuth* auth) {
|
||||||
|
m_auth = auth;
|
||||||
|
if (m_auth && m_auth->isAuthenticated()) {
|
||||||
|
std::cout << "[OverteClient] Metaverse authentication configured for user: "
|
||||||
|
<< m_auth->getUsername() << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool OverteClient::isAuthenticated() const {
|
bool OverteClient::isAuthenticated() const {
|
||||||
return m_auth && m_auth->isAuthenticated();
|
return m_auth && m_auth->isAuthenticated();
|
||||||
}
|
}
|
||||||
@@ -1390,19 +1398,21 @@ void OverteClient::sendDomainConnectRequest() {
|
|||||||
// 13. Place name (QString) - empty
|
// 13. Place name (QString) - empty
|
||||||
qs.writeQString("");
|
qs.writeQString("");
|
||||||
|
|
||||||
// 14. Directory services username (QString) - empty for now
|
// 14. Directory services (metaverse) username (QString)
|
||||||
// TODO: Username sending causes domain server to not respond
|
std::string metaverseUsername = "";
|
||||||
// const char* usernameEnv = std::getenv("OVERTE_USERNAME");
|
if (m_auth && m_auth->isAuthenticated()) {
|
||||||
// std::string dsUsername = usernameEnv ? usernameEnv : "";
|
metaverseUsername = m_auth->getUsername();
|
||||||
qs.writeQString(""); // Always send empty for now
|
std::cout << "[OverteClient] Including metaverse username: " << metaverseUsername << std::endl;
|
||||||
|
}
|
||||||
|
qs.writeQString(metaverseUsername);
|
||||||
|
|
||||||
// 15. Username signature (QString) - empty (no keypair authentication)
|
// 15. Username signature (QString) - empty (no keypair authentication yet)
|
||||||
qs.writeQString("");
|
qs.writeQString("");
|
||||||
|
|
||||||
// 16. Domain username (QString) - send empty for compatibility
|
// 16. Domain username (QString) - empty for now (domain-specific auth not yet implemented)
|
||||||
qs.writeQString("");
|
qs.writeQString("");
|
||||||
|
|
||||||
// 17. Domain access token:refreshToken (QString) - send empty for compatibility
|
// 17. Domain access token:refreshToken (QString) - empty for now
|
||||||
qs.writeQString("");
|
qs.writeQString("");
|
||||||
|
|
||||||
// Append payload to packet
|
// Append payload to packet
|
||||||
|
|||||||
Reference in New Issue
Block a user