ValidateUser() public abstract method

public abstract ValidateUser ( string name, string password ) : bool
name string
password string
return bool
Ejemplo n.º 1
0
        public bool ValidateUser(string userName, string password)
        {
            if (String.IsNullOrEmpty(userName))
            {
                throw new ArgumentException("Value cannot be null or empty.", "userName");
            }
            if (String.IsNullOrEmpty(password))
            {
                throw new ArgumentException("Value cannot be null or empty.", "password");
            }

            return(_provider.ValidateUser(userName, password));
        }
Ejemplo n.º 2
0
        private bool ValidateLogOnInformation(MembershipProvider membershipProvider, string userName, string password)
        {
            if (String.IsNullOrEmpty(userName))
            {
                ModelState.AddModelError("username", "You must specify a username.");
            }
            if (String.IsNullOrEmpty(password))
            {
                ModelState.AddModelError("password", "You must specify a password.");
            }
            if (!membershipProvider.ValidateUser(userName, password))
            {
                ModelState.AddModelError("_FORM", "The username or password provided is incorrect.");
            }

            return ModelState.IsValid;
        }
Ejemplo n.º 3
0
        public bool ValidateUser(string applicationName, string username, string password)
        {
            _Provider.ApplicationName = _ApplicationName;

            return(_Provider.ValidateUser(username, password));
        }