Пример #1
0
        static void Authenticate()
        {
            Console.Write("Username: "******"Password: "******"Plex Auth Token: " + user.authenticationToken);
        }
Пример #2
0
        public void LoginToMyPlex(EditableText username, EditableText password)
        {
            this.username = username.Value;

            MyPlex api = new MyPlex();

            user    = api.Authenticate(username.Value, password.Value);
            servers = api.GetServers(user);

            Properties.Settings.Default.Save();

            DialogTest(user.authenticationToken);
            //GoBack();
        }
Пример #3
0
 // Sign in button handler
 private void BtnSignin_Click(object sender, EventArgs e)
 {
     myplex = new MyPlex();
     user   = myplex.Authenticate(TxtUsername.Text, TxtPassword.Text);
     // API will return a user object with a non-null email if the login was successful
     if (user.email == null)
     {
         MessageBox.Show("Invalid credentials. Please try again.");
         TxtUsername.Text = "";
     }
     else
     {
         FrmHome home = new FrmHome(user);
         home.Show();
         this.Hide();
     }
 }