public bool Valid(string accountId, string password, string otp)
        {
            var dbPassword = _profile.GetPassword(accountId);

            var hashedPassword = _hash.GetPassword(password);

            var currentOtp = _otpService.GetCurrent(accountId);

            var isValid = dbPassword == hashedPassword && otp == currentOtp;

            return(isValid);
        }
Exemplo n.º 2
0
 private void GivenOtp(string accountId, string otp)
 {
     _otpService.GetCurrent(accountId).ReturnsForAnyArgs(otp);
 }