Esempio n. 1
0
        public AspUserManager(
            AspUserStore <TRole, TUser> userStore,
            AspRoleManager <TRole, TUser> roleManager,
            BaseModuleManager <TModule, TUser> moduleManager,
            IParametroManager parametroManager) : base(userStore)
        {
            AspStore              = userStore;
            this.RoleManager      = roleManager;
            this.ModuleManager    = moduleManager;
            this.ParametroManager = parametroManager;


            UserLockoutEnabledByDefault          = true;
            DefaultAccountLockoutTimeSpan        = TimeSpan.FromMinutes(ParametroManager.GetValor <int>(CodigosParametros.PARAMETRO_SEGURIDAD_BLOQUEO_USUARIO_TIEMPO));
            MaxFailedAccessAttemptsBeforeLockout = ParametroManager.GetValor <int>(CodigosParametros.PARAMETRO_SEGURIDAD_BLOQUEO_USUARIO_INTENTOS);


            PasswordValidator = new PasswordValidator
            {
                RequiredLength          = ParametroManager.GetValor <int>(CodigosParametros.PARAMETRO_SEGURIDAD_CLAVE_MINIMO_LONGITUD),
                RequireNonLetterOrDigit = ParametroManager.GetValor <bool>(CodigosParametros.PARAMETRO_SEGURIDAD_CLAVE_REQUIERE_CARACTER_DIFERENTE_LETRA_DIGITO),
                RequireDigit            = ParametroManager.GetValor <bool>(CodigosParametros.PARAMETRO_SEGURIDAD_CLAVE_REQUIERE_DIGITO),
                RequireLowercase        = ParametroManager.GetValor <bool>(CodigosParametros.PARAMETRO_SEGURIDAD_CLAVE_REQUIERE_LETRA_MINUSCULA),
                RequireUppercase        = ParametroManager.GetValor <bool>(CodigosParametros.PARAMETRO_SEGURIDAD_CLAVE_REQUIERE_LETRA_MAYUSCULA),
            };
        }
Esempio n. 2
0
 public UserManager(AspUserStore <Rol, Usuario> userStore,
                    AspRoleManager <Rol, Usuario> roleManager,
                    BaseModuleManager <Modulo, Usuario> moduleManager,
                    IParametroManager parametroManager) :
     base(userStore, roleManager, moduleManager, parametroManager)
 {
 }