public override void Validate(string userName, string password) { Player foundPlayer = playerCtr.RetrievePlayer(userName); if (foundPlayer != null && foundPlayer.Name.Equals(userName) && SecurePasswordHelper.VerifyPassword(password, foundPlayer.HashedPassword)) { } else { throw new FaultException <Exception>(new Exception("Invalid login..."), "Invalid credentials"); } }
public bool Login(string userName, string password) { Player foundPlayer = playerCtr.RetrievePlayer(userName); if (foundPlayer != null && foundPlayer.Name.Equals(userName)) { return(SecurePasswordHelper.VerifyPassword(password, foundPlayer.HashedPassword)); } else { return(false); } }