public async Task Login() { await ExecuteSafeAsync(async() => { var identity = await loginFacade.Login(Data); await Context.GetAuthentication().SignInAsync(AppUserManager.AuthenticationScheme, new ClaimsPrincipal(identity)); Context.RedirectToRoute("Default"); }); }
private void btnSignIn_Click(object sender, EventArgs e) { try { var login = new LoginFacade(txtUserName.text, txtPassword.text); login.Login(this); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void VerifyAndDeleteCandidate() { this.Browser.Navigate().GoToUrl(academyLink); var loginFacade = new LoginFacade(); loginFacade.Login(Browser, "ageorgieva", "{password}"); this.Browser.Navigate().GoToUrl(string.Concat(academyLink, "Administration_SoftwareAcademy/Candidates")); var candidateFasade = new CandidateAdminPanelFacade(); candidateFasade.VerifyCandidate(Browser); candidateFasade.DeleteCandidate(Browser, "*****@*****.**"); candidateFasade.VerifyCandidate(Browser); }
public void ApplayForSortwareAcademy() { this.Browser.Navigate().GoToUrl(academyLink); LoginFacade loginFacade = new LoginFacade(); loginFacade.Login(this.Browser, "ageorgieva", "{password}"); ApplyForAcademyFacade applyFacade = new ApplyForAcademyFacade(); applyFacade.NavigateToTheApplyingForm(this.Browser); applyFacade.PopulatePersonalData(this.Browser); applyFacade.PopulateAdditionalQuestions(this.Browser); applyFacade.PopulateDocuments(this.Browser); applyFacade.SubmitForm(this.Browser); }
public void Login() { if (string.IsNullOrEmpty(UserName) || string.IsNullOrEmpty(Password)) { ErrorMessage = "Meno alebo heslo nezadané"; return; } var identity = loginFacade.Login(UserName, Password); if (identity == null) { ErrorMessage = "Nesprávne meno a heslo."; return; } else { Context.OwinContext.Authentication.SignIn(identity); } Context.Redirect("MyProfile", null); }
public void Submit() { try { loginFacade.CompleteRegistration(UserName, NewPassword.Password, PasswordToken); personalProfileFacade.Insert(Mapper.Map <PersonalProfileDto>(Profile), UserName); } catch (UIException ex) { ErrorMessage = ex.Message; return; } var identity = loginFacade.Login(UserName, NewPassword.Password); if (identity != null) { Context.OwinContext.Authentication.SignIn(identity); Context.Redirect("MyProfile", null); } IsSuccessfullyFinished = true; }
public string Post([FromBody] LoginModel model) { return(LoginFacade.Login(model.Email, model.Password)); }