Deprecate login() method in OverteClient and update documentation to use OverteAuth directly
This commit is contained in:
@@ -154,19 +154,17 @@ OverteClient::OverteClient(std::string domainUrl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
OverteClient::~OverteClient() {
|
OverteClient::~OverteClient() {
|
||||||
// Destructor implementation (required for unique_ptr with forward-declared type)
|
// Destructor implementation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use OverteAuth directly from main.cpp and call setAuth()
|
||||||
|
// bool OverteClient::login(const std::string& username, const std::string& password, const std::string& metaverseUrl) {
|
||||||
|
// This method is deprecated - authentication should be handled in main.cpp
|
||||||
|
// and passed via setAuth()
|
||||||
|
// }
|
||||||
bool OverteClient::login(const std::string& username, const std::string& password, const std::string& metaverseUrl) {
|
bool OverteClient::login(const std::string& username, const std::string& password, const std::string& metaverseUrl) {
|
||||||
if (!m_auth) {
|
std::cerr << "[OverteClient] WARNING: login() is deprecated. Use OverteAuth in main.cpp and call setAuth()" << std::endl;
|
||||||
m_auth = std::make_unique<OverteAuth>();
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
bool success = m_auth->login(username, password, metaverseUrl);
|
|
||||||
if (success) {
|
|
||||||
m_username = username;
|
|
||||||
}
|
|
||||||
return success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverteClient::setAuth(OverteAuth* auth) {
|
void OverteClient::setAuth(OverteAuth* auth) {
|
||||||
|
|||||||
Reference in New Issue
Block a user