void OpenSimWorldSession::SetCredentials(const LoginCredentials &credentials) { if (credentials.GetType() == ProtocolUtilities::AT_OpenSim) credentials_ = credentials; else ProtocolModuleOpenSim::LogInfo("Could not set credentials, invalid type. Must be OpenSim for OpenSimWorldSession"); }
bool OpenSimWorldSession::StartSession(const LoginCredentials &credentials, const QUrl &serverEntryPointUrl) { bool success = false; if (credentials.GetType() == ProtocolUtilities::AT_OpenSim) { // Set Url and Credentials serverEntryPointUrl_ = ValidateUrl(serverEntryPointUrl.toString(), WorldSessionInterface::OpenSimServer); credentials_ = credentials; // Try do OpenSim login with ProtocolModuleOpenSim success = LoginToServer( credentials_.GetFirstName(), credentials_.GetLastName(), credentials_.GetPassword(), serverEntryPointUrl_.toString(), QString::number(serverEntryPointUrl_.port()), credentials_.GetStartLocation(), GetConnectionThreadState()); } else { ProtocolModuleOpenSim::LogInfo("Invalid credential type, must be OpenSimCredentials for OpenSimWorldSession"); success = false; } return success; }
bool RealXtendWorldSession::StartSession(const LoginCredentials &credentials, const QUrl &serverEntryPointUrl) { bool success = false; if (credentials.GetType() == ProtocolUtilities::AT_RealXtend) { // Set Url and Credentials serverEntryPointUrl_ = ValidateUrl(serverEntryPointUrl.toString(), WorldSessionInterface::OpenSimServer); credentials_ = credentials; credentials_.SetAuthenticationUrl( ValidateUrl(credentials_.GetAuthenticationUrl().toString(), WorldSessionInterface::RealXtendAuthenticationServer) ); // Try do RealXtend auth based login with ProtocolModuleOpenSim success = LoginToServer( credentials_.GetPassword(), serverEntryPointUrl_.host(), QString::number(serverEntryPointUrl_.port()), credentials_.GetAuthenticationUrl().host(), QString::number(credentials_.GetAuthenticationUrl().port()), credentials_.GetIdentity(), credentials_.GetStartLocation(), GetConnectionThreadState()); } else { ProtocolModuleOpenSim::LogInfo("Invalid credential type, must be RealXtend for RealXtendWorldSession"); success = false; } return success; }