Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
            }
        }