Esempio n. 1
0
        private void OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
        {
            StatusArgs status = new StatusArgs();

            status.Status = StatusArgs.TwitchBotStatus.IncorrectLogin;
            StatusEvent(this, status);
        }
        private async void LoginAuthFailed(object sender, OnIncorrectLoginArgs e)
        {
            ConnectionChangeInProgress = false;
            await RefreshToken();

            client.Disconnect();
            client.SetConnectionCredentials(await GetTwitchCredentials());
        }
Esempio n. 3
0
        /// <summary>
        /// Invokes the incorrect login.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="ex">The ex.</param>
        public static void InvokeIncorrectLogin(this TwitchClient client, Exceptions.ErrorLoggingInException ex)
        {
            OnIncorrectLoginArgs model = new OnIncorrectLoginArgs()
            {
                Exception = ex
            };

            client.RaiseEvent("OnIncorrectLogin", model);
        }
 private void Cl_OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     try
     {
         doNotReconnect = true;
         this.logger.LogWarning($"Incorrect Login Exception Occurred.");
     }
     catch (Exception exc)
     {
         this.logger.LogError(ExceptionFormatter.FormatException(exc, $"Exception in {this.GetType().Name} - {System.Reflection.MethodBase.GetCurrentMethod().Name}"));
     }
 }
Esempio n. 5
0
        private void OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
        {
            const string message = "Username or Oauth token wrong";
            const string caption = "Login Error";
            var          result  = MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Error);

            // If the no button was pressed ...
            if (result == DialogResult.OK)
            {
                btnDisconnect_Click(sender, e);
            }
        }
Esempio n. 6
0
 // Token: 0x06000015 RID: 21 RVA: 0x00002C60 File Offset: 0x00000E60
 private void onLoginInc(object sender, OnIncorrectLoginArgs e, int position)
 {
     try
     {
         this.Log((sender as TwitchClient).TwitchUsername + " Login failed");
         this.Common.Dispatcher.Invoke(delegate()
         {
             (this.Common.Items[position] as ListBoxItem).Foreground = Brushes.Red;
         });
         this.status[position] = "Failed";
     }
     catch (Exception ex)
     {
         try
         {
             this.Log(ex.Message);
         }
         catch
         {
         }
     }
 }
Esempio n. 7
0
        private void OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
        {
            var requestBody = JsonConvert.SerializeObject(new RefreshRequestDto
            {
                refreshToken = _refreshToken,
                clientId     = _clientId,
                clientSecret = _clientSecret
            });

            var request = new HttpRequestMessage(HttpMethod.Post, "https://id.twitch.tv/oauth2/token");

            request.Content = new StringContent(requestBody, Encoding.UTF8, "application/json");
            request.Content.Headers.ContentType.CharSet = "";
            var response = _httpClient.SendAsync(request).Result;
            var content  = response.Content.ReadAsStringAsync().Result;

            var result = JsonConvert.DeserializeObject <RefreshResponseDto>(content);

            _refreshToken = result.refreshToken;

            ConfigureTwitch(_username, _clientId, _clientSecret, result.accessToken, result.refreshToken, _channel);
            Start();
        }
Esempio n. 8
0
 private void Client_OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     eventLog.WriteEntry("Incorrect login: " + e.Exception.ToString());
 }
Esempio n. 9
0
 public static void OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     Log.Error("Incorrect login detected. " + e.Exception.Message);
 }
Esempio n. 10
0
 private void Client_OnIncorrectLogin(object?sender, OnIncorrectLoginArgs e)
 {
     client.Disconnect();
 }
Esempio n. 11
0
 private void Client_OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     consoleMessage[3] = "Incorrect Login!";
     consoleMessage[5] = e.Exception.Message;
     Program.SendToConsole(consoleMessage);
 }
Esempio n. 12
0
 /// <summary>
 /// Shuts down the client if the connection fails with an invalid login error.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">An <see cref="OnIncorrectLoginArgs"/> object.</param>
 private void TwitchClient_OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     this.OnIncorrectLogin?.Invoke(this, e);
     this.Shutdown();
 }
Esempio n. 13
0
 private void Client_OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     logService.Add($"{e.Exception.Message} {e.Exception.Data}", MessageType.Type.ERROR,
                    MethodBase.GetCurrentMethod().DeclaringType);
 }
Esempio n. 14
0
 private void Client_OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     Console.WriteLine($"AUTH ERROR: {e.Exception.Message}");
 }
Esempio n. 15
0
 public void incorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     MessageBox.Show("Failed login as chat client!!!\nException: " + e.Exception + "\nUsername: " + e.Exception.Username);
 }
Esempio n. 16
0
 private void Client_OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     loginError = true;
     mainForm.ChangeConnectionStatusLabel("Error!", true);
     mainForm.ShowMessageBoxError("Authentication Error!", "Login authentication failed!\nPlease, check your credentials and try again.");
 }
 /// <summary>
 /// Called when the twitch client has an failed login attempt (callback)
 /// </summary>
 private void OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     logger.Error("incorrect twitch login, check user name and oauth");
     client.Disconnect();
 }
Esempio n. 18
0
 private void OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     Debug.Log("<color=red> ERROR:  " + e.Exception + "</color>");
 }
 private async void Client_OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     await _eventProxy.PublishAsync(new TwitchIncorrectLoginNotification(this, e.Exception))
     .ConfigureAwait(false);
 }
Esempio n. 20
0
 private void Client_OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     // TODO : Message MainForm the login was invalid
     MessageBox.Show("A connection error has occured, please check your login details and try again.", "Connection Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
 }
Esempio n. 21
0
 private void Client_OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     OnChatEvent?.Invoke(new TwitchChatEvent(TwitchChatEventType.LogError,
                                             e.Exception.ToString()));
 }
Esempio n. 22
0
 private async void ChatIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     Utils.LogToConsole($"Chat incorrect login: {e.Exception.Message}");
     await Utils.SendDiscordErrorWebhookAsync($"{_config.DiscordWebhookUserPing}: Incorrect chat credentials for Twitch bot", _config.DiscordWebhookUrl);
 }
Esempio n. 23
0
 private void TwitchOnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
     Core.LOG(new LogEntry(LOGSEVERITY.ERROR, "EventCatcherTwitch",  
         $"Twitch login failed! {e.Exception.Message}"));
 }
Esempio n. 24
0
 private void _client_OnIncorrectLogin(object sender, OnIncorrectLoginArgs e)
 {
 }