Beispiel #1
0
        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");
            }
        }
Beispiel #2
0
        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);
            }
        }