Esempio n. 1
0
        public bool CheckPassword(string password)
        {
            password.MustNotBeNull();
            password.MustNotBeEmpty();

            password = password.Trim();

            if (_password == password)
            {
                DomainContext.Publish(new UserPasswordSuccess(_username));
                return(true);
            }

            DomainContext.Publish(new UserPasswordFailure(_username));

            return(false);
        }
Esempio n. 2
0
        public bool CheckPassword(string password)
        {
            Guard.AgainstNull(password, "password");
            Guard.AgainstEmpty(password, "password");

            password = password.Trim();

            if (_password == password)
            {
                DomainContext.Publish(new UserPasswordSuccess(_username));
                return(true);
            }

            DomainContext.Publish(new UserPasswordFailure(_username));

            return(false);
        }