public UserIdentity Authenticate(string email, string encryptedPassword) { UserIdentity authenticatedUser = null; using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CMSDataStoreKey)) { AuthenticateFacade facade = new AuthenticateFacade(uow); authenticatedUser = facade.Authenticate(email, encryptedPassword); } return(authenticatedUser); }
private void ProcAuthentication(string email, string encryptedPassword) { UserIdentity authenticatedUser = null; using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CRMDataStoreKey)) { AuthenticateFacade facade = new AuthenticateFacade(uow); authenticatedUser = facade.Authenticate(email, encryptedPassword); } if (authenticatedUser != null) { AfterLogin(authenticatedUser); } else { FailedLogin(email); } }