public AuthViewModel(TestAuth test) { if (test == null) { return; } ID = test.ID; Name = test.Name; Desc = test.Desc; }
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, }); }
public object Any(TestAuth request) => request;
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; } }