示例#1
0
        public OmsUserManager(ApiUserContext dbContext) : base(new UsuarioStore(dbContext))
        {
            if (Dbcontext == null)
            {
                Dbcontext = dbContext;
            }

            UserValidator = new UserValidator <Usuario, long>(this)
            {
                AllowOnlyAlphanumericUserNames = false,
                RequireUniqueEmail             = true
            };

            PasswordValidator = new PasswordValidator
            {
                RequiredLength          = 6,
                RequireNonLetterOrDigit = false,
                RequireDigit            = false,
                RequireLowercase        = false,
                RequireUppercase        = false,
            };

            //UserTokenProvider = new EmailTokenProvider<ApplicationUser>();
            ClaimsIdentityFactory = new ClaimsFactory();

            // enable lockout on users
            DefaultAccountLockoutTimeSpan        = TimeSpan.FromMinutes(1);
            MaxFailedAccessAttemptsBeforeLockout = 6;
            UserLockoutEnabledByDefault          = true;
        }
示例#2
0
 public RoleManager(ApiUserContext context) : base(new RoleStore <Roles, long, UsuarioRole>(context))
 {
     _context = context;
 }
示例#3
0
 public UsuarioStore(ApiUserContext context) : base(context)
 {
 }