Example #1
0
        public AccountManager(IUserStore <User> store) : base(store)
        {
            accountStore  = store as AccountStore;
            UserValidator = new UserValidator <User>(this)
            {
                AllowOnlyAlphanumericUserNames = true,
                RequireUniqueEmail             = true
            };

            PasswordValidator = new PasswordValidator
            {
                RequiredLength = 6
            };

            MachineKeyDataProtectionProvider dataProtectionProvider = new MachineKeyDataProtectionProvider();

            this.UserTokenProvider = new DataProtectorTokenProvider <User, string>(dataProtectionProvider.Create("Email Notification"))
            {
                TokenLifespan = TimeSpan.FromHours(6)
            };
        }