扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:佚名 来源:博客园 2007年11月6日
关键字: ASP.NET membership 原理 应用 Windows
public abstract class MembershipProvider : ProviderBase ...{ // Events public event MembershipValidatePasswordEventHandler ValidatingPassword; // Methods protected MembershipProvider(); public abstract bool ChangePassword(string username, string oldPassword, string newPassword); public abstract bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer); public abstract MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status); protected virtual byte[] DecryptPassword(byte[] encodedPassword); public abstract bool DeleteUser(string username, bool deleteAllRelatedData); internal string EncodePassword(string pass, int passwordFormat, string salt); protected virtual byte[] EncryptPassword(byte[] password); public abstract MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords); public abstract MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords); internal string GenerateSalt(); public abstract MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords); public abstract int GetNumberOfUsersOnline(); public abstract string GetPassword(string username, string answer); public abstract MembershipUser GetUser(object providerUserKey, bool userIsOnline); public abstract MembershipUser GetUser(string username, bool userIsOnline); internal MembershipUser GetUser(string username, bool userIsOnline, bool throwOnError); public abstract string GetUserNameByEmail(string email); protected virtual void OnValidatingPassword(ValidatePasswordEventArgs e); public abstract string ResetPassword(string username, string answer); internal string UnEncodePassword(string pass, int passwordFormat); public abstract bool UnlockUser(string userName); public abstract void UpdateUser(MembershipUser user); public abstract bool ValidateUser(string username, string password); // Properties public abstract string ApplicationName ...{ get; set; } public abstract bool EnablePasswordReset ...{ get; } public abstract bool EnablePasswordRetrieval ...{ get; } public abstract int MaxInvalidPasswordAttempts ...{ get; } public abstract int MinRequiredNonAlphanumericCharacters ...{ get; } public abstract int MinRequiredPasswordLength ...{ get; } public abstract int PasswordAttemptWindow ...{ get; } public abstract MembershipPasswordFormat PasswordFormat ...{ get; } public abstract string PasswordStrengthRegularExpression ...{ get; } public abstract bool RequiresQuestionAndAnswer ...{ get; } public abstract bool RequiresUniqueEmail ...{ get; } // Fields private MembershipValidatePasswordEventHandler _EventHandler; private const int SALT_SIZE_IN_BYTES = 0x10; } |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者