public bool Verify(string accountId, string inputPassword, string otp) { var password = _Profile.GetPassword(accountId); var hashPassword = _Hash.ComputeHash(inputPassword); var currentOpt = _OtpService.GetOpt(accountId); if (hashPassword != password || currentOpt != otp) { //_LogFailedCounterDecorator.LogFailedCount(accountId); return(false); } return(true); }
private void GivenOtp(string account, string otp) { _Otp.GetOpt(account).Returns(otp); }