public bool MatchesHistory(PasswordMatch <T> matcher, T passwordNew)
 {
     lock (this.passwordPayloads)
     {
         foreach (T item in this.passwordPayloads)
         {
             if (matcher(passwordNew, item))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Exemple #2
0
        public bool IsMatchingPassword(string accountName, string password)
        {
            string hashedPassword;

            try
            {
                hashedPassword = queryService.GetPassword(accountName);
            }
            catch (EntityNotFoundException)
            {
                return(false);
            }

            var providedPassword = new Password(password);

            PasswordMatch match = providedPassword.MatchTo(hashedPassword);

            return(match == PasswordMatch.Success || match == PasswordMatch.SuccessRehashNeeded);
        }
 public void Execute(PasswordMatch command)
 {
     throw new NotImplementedException();
     //_repository.PasswordMatched(command.Account, command.Matched);
 }