示例#1
0
        /// <summary>
        /// Setup a SQL Command to do a login check
        /// </summary>
        /// <param name="command">A SQL Command instance</param>
        /// <param name="criteria">The login criteria</param>
        protected override void SetupSqlCommand(SqlCommand command, IdentityCriterea criteria)
        {
            base.SetupSqlCommand(command, criteria);

            command.CommandText = "CmdProcs.WebLogin";
            command.Parameters["@Password"].Value = OETWebSecurity.GetPasswordHash(command.Parameters["@Password"].Value.ToString());
        }
示例#2
0
        /// <summary>
        /// Adds the hashed password to the given SQL parameters list
        /// </summary>
        /// <param name="parameters">SQL Parameters list</param>
        protected override void AddExtraParameters(ref SqlParameterCollection parameters)
        {
            base.AddExtraParameters(ref parameters);

            var password = parameters["@Password"].Value;

            if (password != DBNull.Value)
            {
                parameters["@Password"].Value = OETWebSecurity.GetPasswordHash(password.ToString());
            }
        }