public ResetPasswordTokenAccountApplication( IComponentContext context, IResetPasswordTokenFactory resetPasswordTokenFactory, IAccountService accountService, ICustomerImportService customerImportService, IResetPasswordTokenRepository resetPasswordTokenRepository, IApplicationStoreRepository applicationStoreRepository, IPasswordLogRepository passwordLogRepository, IEmailSender svcEmail, ILockedUpMemberPolicy lockedUpMemberPolicy, ILockMemberPolicy lockMemberPolicy, IPasswordPolicy passwordPolicy, IAccountRepository accountRepository) : base(context, resetPasswordTokenRepository, applicationStoreRepository) { this.resetPasswordTokenFactory = resetPasswordTokenFactory; this.accountService = accountService; this.customerImportService = customerImportService; this.applicationStoreRepository = applicationStoreRepository; this.passwordLogRepository = passwordLogRepository; this.svcEmail = svcEmail; this.lockedUpMemberPolicy = lockedUpMemberPolicy; this.lockMemberPolicy = lockMemberPolicy; this.passwordPolicy = passwordPolicy; this.accountRepository = accountRepository; }
public AccountApplication( IComponentContext context, IAccountService accountService, IAccountRepository accountRepository, IEmailSender svcEmail, ILockedUpMemberPolicy lockedUpMemberPolicy, ILockMemberPolicy lockMemberPolicy, IPasswordPolicy passwordPolicy, IApplicationStoreRepository applicationStoreRepository, IResetPasswordTokenRepository resetPasswordTokenRepository, IApplicationRepository applicationRepository, IStoreRepository storeRepositoy, IAccountRoleRepository accountRoleRepository, IRoleRepository roleRepository, IPermissionRepository permissionRepository, IResourceRepository resourceRepository, ICustomerImportService customerImportService, IResetPasswordTokenService resetPasswordTokenService, IPasswordLogRepository passwordLogRepository, IApplicationStoreService applicationStoreService, ICustomerRepository customerRepository, IAccountPermissionService accPermissionService, IAccountInfraService accountInfraService) : base(context) { this.svcEmail = svcEmail; this.lockedUpMemberPolicy = lockedUpMemberPolicy; this.lockMemberPolicy = lockMemberPolicy; this.passwordPolicy = passwordPolicy; this.accountService = accountService; this.applicationStoreRepository = applicationStoreRepository; this.resetPasswordTokenRepository = resetPasswordTokenRepository; this.applicationRepository = applicationRepository; this.storeRepositoy = storeRepositoy; this.accountRoleRepository = accountRoleRepository; this.roleRepository = roleRepository; this.permissionRepository = permissionRepository; this.resourceRepository = resourceRepository; this.passwordLogRepository = passwordLogRepository; this.customerImportService = customerImportService; this.resetPasswordTokenService = resetPasswordTokenService; this.applicationStoreService = applicationStoreService; this.accPermissionService = accPermissionService; this.accountRepository = accountRepository; this.customerRepository = customerRepository; if (context.TryResolveNamed(FieldType.Account.ToLower(), typeof(IMetadataService), out var metadataService)) { this.metadataService = metadataService as IMetadataService; } this.accountInfraService = accountInfraService; }
public void SuccessfullyLogin(ILockedUpMemberPolicy lockedUpMemberPolicy, ILockMemberPolicy lockMemberPolicy) { if (lockedUpMemberPolicy != null && lockMemberPolicy != null) { if (this.QtyWrongsPassword.HasValue && this.QtyWrongsPassword > 0) { this.QtyWrongsPassword = null; this.LockedUp = null; } } }
public void WrongLoginAttempt(ILockedUpMemberPolicy lockedUpMemberPolicy, ILockMemberPolicy lockMemberPolicy) { if (lockedUpMemberPolicy != null && lockMemberPolicy != null) { this.QtyWrongsPassword = this.QtyWrongsPassword.HasValue ? this.QtyWrongsPassword.Value + 1 : 1; if (!lockMemberPolicy.Validate(this)) { LockMember(); } } }