Beispiel #1
0
        private async Task LoginRTMP(ProgressDialogController controller, HTTPLoginResult res)
        {
            controller.SetMessage("Contacting RTMP Server");
            Supporting.LRtmp rtmpClient = new Supporting.LRtmp();
            await rtmpClient.ConnectAsync();

            com.riotgames.platform.login.AuthenticationCredentials rtmpInfo = new com.riotgames.platform.login.AuthenticationCredentials()
            {
                operatingSystem = "Windows 8",
                username        = txtUser.Text,
                domain          = "lolclient.lol.riotgames.com",
                clientVersion   = "4.17.14_09_22_18_55", //todo: don't hardcode this
                locale          = "en_US",
                password        = txtPass.Password,
                macAddress      = ""
            };
            rtmpInfo.authToken = await Task.Factory.StartNew(() => Newtonsoft.Json.JsonConvert.SerializeObject(new com.riotgames.platform.login.AuthToken
            {
                account_id   = res.lqt.account_id,
                account_name = res.lqt.account_name,
                fingerprint  = res.lqt.fingerprint,
                other        = res.lqt.other,
                resources    = res.lqt.resources,
                signature    = res.lqt.signature,
                timestamp    = res.lqt.timestamp,
                uuid         = res.lqt.uuid
            }));

            if (await rtmpClient.LoginAsync(rtmpInfo))
            {
                com.riotgames.platform.clientfacade.domain.LoginDataPacket data = await rtmpClient.GetLoginDataPacketAsync();

                MainWindow mainWindow = new MainWindow(data, rtmpClient);
                mainWindow.Show();
                rtmpClient.PerformHeartBeatLoop();
                this.Close();
                return;
            }
            else
            {
                await ProgressFailed(controller, "Rejected from RTMPS side(?)");
            }
        }
Beispiel #2
0
 private async Task LoginRTMP(ProgressDialogController controller, HTTPLoginResult res)
 {
     controller.SetMessage("Contacting RTMP Server");
     Supporting.LRtmp rtmpClient = new Supporting.LRtmp();
     await rtmpClient.ConnectAsync();
     com.riotgames.platform.login.AuthenticationCredentials rtmpInfo = new com.riotgames.platform.login.AuthenticationCredentials()
     {
         operatingSystem = "Windows 8",
         username = txtUser.Text,
         domain = "lolclient.lol.riotgames.com",
         clientVersion = "4.17.14_09_22_18_55", //todo: don't hardcode this
         locale = "en_US",
         password = txtPass.Password,
         macAddress = ""
     };
     rtmpInfo.authToken = await Task.Factory.StartNew(() => Newtonsoft.Json.JsonConvert.SerializeObject(new com.riotgames.platform.login.AuthToken
     {
         account_id = res.lqt.account_id,
         account_name = res.lqt.account_name,
         fingerprint = res.lqt.fingerprint,
         other = res.lqt.other,
         resources = res.lqt.resources,
         signature = res.lqt.signature,
         timestamp = res.lqt.timestamp,
         uuid = res.lqt.uuid
     }));
     if (await rtmpClient.LoginAsync(rtmpInfo))
     {
         com.riotgames.platform.clientfacade.domain.LoginDataPacket data = await rtmpClient.GetLoginDataPacketAsync();
         MainWindow mainWindow = new MainWindow(data, rtmpClient);
         mainWindow.Show();
         rtmpClient.PerformHeartBeatLoop();
         this.Close();
         return;
     }
     else
     {
         await ProgressFailed(controller, "Rejected from RTMPS side(?)");
     }
 }