Exemplo n.º 1
0
        public AuthViewModel(TestAuth test)
        {
            if (test == null)
            {
                return;
            }

            ID   = test.ID;
            Name = test.Name;
            Desc = test.Desc;
        }
Exemplo n.º 2
0
        public object Any(TestAuth request)
        {
            var session = base.SessionAs <CustomUserSession>();

            return(new TestAuthResponse {
                UserId = session.UserAuthId,
                UserName = session.UserAuthName,
                DisplayName = session.DisplayName
                              ?? session.UserName
                              ?? $"{session.FirstName} {session.LastName}".Trim(),
                SessionId = session.Id,
            });
        }
Exemplo n.º 3
0
 public object Any(TestAuth request) => request;
Exemplo n.º 4
0
 private async void button1_Click(object sender, EventArgs e)
 {
     textBox1.Text = "*****@*****.**";
     textBox2.Text = "omfgasdlowqq";
     label1.Text = "logging in";
     string username = textBox1.Text;
     string password = textBox2.Text;
     TestAuth test = new TestAuth();
     Token token = await test.DoXAuthAsync(username, password);
     if (token != null)
     {
         label1.Text = token.Key + " " + token.Secret;
     }
     else { label1.Text = test.errormessage; }
 }