Esempio n. 1
0
    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;
    }
Esempio n. 2
0
    bool RealXtendWorldSession::StartSession(ProtocolUtilities::LoginCredentialsInterface *credentials, QUrl *serverEntryPointUrl)
    {
        bool success = false;
        ProtocolUtilities::RealXtendCredentials *testCredentials = dynamic_cast<ProtocolUtilities::RealXtendCredentials *>(credentials);
        if (testCredentials)
        {
            // Set Url and Credentials
            serverEntryPointUrl_ = ValidateUrl(serverEntryPointUrl->toString(), WorldSessionInterface::OpenSimServer);
            serverEntryPointUrl = &serverEntryPointUrl_;
            credentials_ = testCredentials;
            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(),
                GetConnectionThreadState());
        }
        else
        {
            ProtocolModuleOpenSim::LogInfo("Invalid credential type, must be RealXtendCredentials for RealXtendWorldSession");
            success = false;
        }

        return success;
    }
Esempio n. 3
0
    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;
    }