Пример #1
0
        public WalletController(
            IBlockchainController blockchainController,
            ICertificateService certificateService,
            IMessagePublisher messagePublisher,
            IMessageSubscriber messageSubscriber,
            INetworkController networkController,
            INotificationService notificationService,
            ISettingsManager settingsManager)
        {
            this.blockchainController = blockchainController;
            this.certificateService   = certificateService;
            this.messagePublisher     = messagePublisher;
            this.messageSubscriber    = messageSubscriber;
            this.networkController    = networkController;
            this.notificationService  = notificationService;

            this.blockchainDataDirectoryPath = settingsManager.BlockchainDataDirectoryPath;

            this.localNodePort = settingsManager.LocalNodePort;
            this.localWSPort   = settingsManager.LocalWSPort;

            this.certificateCachePath = settingsManager.CertificateCachePath;

            this.certificateQueryResultCache = new Dictionary <ECPoint, CertificateQueryResult>();
        }
Пример #2
0
 public OrganizationsController(
     AuthenticationService authService,
     IMessageService messageService,
     IUserService userService,
     ITelemetryService telemetryService,
     ISecurityPolicyService securityPolicyService,
     ICertificateService certificateService,
     IPackageService packageService,
     IDeleteAccountService deleteAccountService,
     IContentObjectService contentObjectService,
     IMessageServiceConfiguration messageServiceConfiguration,
     IIconUrlProvider iconUrlProvider,
     IFeatureFlagService features,
     IGravatarProxyService gravatarProxy)
     : base(
         authService,
         packageService,
         messageService,
         userService,
         telemetryService,
         securityPolicyService,
         certificateService,
         contentObjectService,
         messageServiceConfiguration,
         deleteAccountService,
         iconUrlProvider,
         gravatarProxy)
 {
     _features = features ?? throw new ArgumentNullException(nameof(features));
 }
Пример #3
0
 public CertificateController(ICertificateService Certificatedb, IProjectInfoService Projectdb, IProviderService providerdb, IMapper IMapper)
 {
     this.Certificatedb = Certificatedb;
     this.Projectdb     = Projectdb;
     this.providerdb    = providerdb;
     this.IMapper       = IMapper;
 }
Пример #4
0
        public CourseController(
            ICourseService courseRepository,
            ICategoryService categoryRepository,
            ICertificateService certificateRepository,
            IAudienceService audienceRepository)
        {
            if (courseRepository == null)
            {
                throw new ArgumentNullException("courseRepository");
            }

            if (categoryRepository == null)
            {
                throw new ArgumentNullException("categoryRepository");
            }

            if (certificateRepository == null)
            {
                throw new ArgumentNullException("certificateRepository");
            }

            if (audienceRepository == null)
            {
                throw new ArgumentNullException("audienceRepository");
            }

            _courseRepository      = courseRepository;
            _categoryRepository    = categoryRepository;
            _audienceRepository    = audienceRepository;
            _certificateRepository = certificateRepository;
        }
 private CertificateService.CertificateRC LoadSwCertificate()
 {
     certServ = uc.Resolve<ICertificateService>();
     string fnCert = @"C:\GIT\eZustellung\TestDaten\TestDatenSammlung\TestDatenSammlung\Daten\eZustellPOC\jb_labs1.pfx";
     var rc = certServ.Load(fnCert, "password");
     return rc;
 }
Пример #6
0
        public AccountsController(
            AuthenticationService authenticationService,
            IPackageService packageService,
            IMessageService messageService,
            IUserService userService,
            ITelemetryService telemetryService,
            ISecurityPolicyService securityPolicyService,
            ICertificateService certificateService,
            IContentObjectService contentObjectService,
            IMessageServiceConfiguration messageServiceConfiguration,
            IDeleteAccountService deleteAccountService,
            IIconUrlProvider iconUrlProvider,
            IGravatarProxyService gravatarProxy)
        {
            AuthenticationService       = authenticationService ?? throw new ArgumentNullException(nameof(authenticationService));
            PackageService              = packageService ?? throw new ArgumentNullException(nameof(packageService));
            MessageService              = messageService ?? throw new ArgumentNullException(nameof(messageService));
            UserService                 = userService ?? throw new ArgumentNullException(nameof(userService));
            TelemetryService            = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
            SecurityPolicyService       = securityPolicyService ?? throw new ArgumentNullException(nameof(securityPolicyService));
            CertificateService          = certificateService ?? throw new ArgumentNullException(nameof(certificateService));
            ContentObjectService        = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
            MessageServiceConfiguration = messageServiceConfiguration ?? throw new ArgumentNullException(nameof(messageServiceConfiguration));
            DeleteAccountService        = deleteAccountService ?? throw new ArgumentNullException(nameof(deleteAccountService));
            IconUrlProvider             = iconUrlProvider ?? throw new ArgumentNullException(nameof(iconUrlProvider));
            GravatarProxy               = gravatarProxy ?? throw new ArgumentNullException(nameof(gravatarProxy));

            _deleteAccountListPackageItemViewModelFactory = new DeleteAccountListPackageItemViewModelFactory(PackageService, IconUrlProvider);
        }
Пример #7
0
 public CertificateManager(IAzureWebAppEnvironment settings, IAcmeConfig acmeConfig, ICertificateService certificateService, IAuthorizationChallengeProvider challengeProvider)
 {
     this.settings           = settings;
     this.certificateService = certificateService;
     this.acmeConfig         = acmeConfig;
     this.challengeProvider  = challengeProvider;
 }
        public ScriptPluginTests()
        {
            log = new Mock.Services.LogService(true);
            iis = new Mock.Clients.MockIISClient();
            cs  = new Mock.Services.CertificateService();
            var tempPath = new DirectoryInfo(Environment.ExpandEnvironmentVariables("%TEMP%\\wacs"));

            if (!tempPath.Exists)
            {
                tempPath.Create();
            }
            batchPath = new FileInfo(tempPath.FullName + "\\create.bat");
            File.WriteAllText(batchPath.FullName, "echo hello %1");

            psPath = new FileInfo(tempPath.FullName + "\\create.ps1");
            File.WriteAllText(psPath.FullName,
                              $"$arg = $($args[0])\n" +
                              $"if ($arg -ne $null -and $arg -ne \"world\") {{ Write-Error \"Wrong\" }}\n" +
                              $"Write-Host \"Hello $arg\""
                              );

            psNamedPath = new FileInfo(tempPath.FullName + "\\createnamed.ps1");
            File.WriteAllText(psNamedPath.FullName,
                              $"param([Parameter(Mandatory)][string]$What)\n" +
                              $"if ($What -ne \"world\") {{ Write-Error \"Wrong\" }} else {{\n" +
                              $"Write-Host \"Hello $arg\" + " +
                              $"}}"
                              );
        }
Пример #9
0
 public UsersController(
     ICuratedFeedService feedsQuery,
     IUserService userService,
     IPackageService packageService,
     IPackageOwnerRequestService packageOwnerRequestService,
     IMessageService messageService,
     IAppConfiguration config,
     AuthenticationService authService,
     ICredentialBuilder credentialBuilder,
     IDeleteAccountService deleteAccountService,
     ISupportRequestService supportRequestService,
     ITelemetryService telemetryService,
     ISecurityPolicyService securityPolicyService,
     ICertificateService certificateService,
     IContentObjectService contentObjectService)
     : base(
         authService,
         feedsQuery,
         packageService,
         messageService,
         userService,
         telemetryService,
         securityPolicyService,
         certificateService,
         contentObjectService)
 {
     _packageOwnerRequestService = packageOwnerRequestService ?? throw new ArgumentNullException(nameof(packageOwnerRequestService));
     _config                = config ?? throw new ArgumentNullException(nameof(config));
     _credentialBuilder     = credentialBuilder ?? throw new ArgumentNullException(nameof(credentialBuilder));
     _deleteAccountService  = deleteAccountService ?? throw new ArgumentNullException(nameof(deleteAccountService));
     _supportRequestService = supportRequestService ?? throw new ArgumentNullException(nameof(supportRequestService));
 }
Пример #10
0
 public HrService(
     IStudentService studentService, IResumeService resumeService, IUserInfoService userInfoService,
     IStreamService streamService, ISummaryService summaryService,
     ISkillService skillService, IForeignLanguageService languageService, IEducationService educationService,
     ICourseService courseService, ICertificateService certificateService, IExamService examService,
     IWorkExperienceService workExperienceService, IPortfolioService portfolioService, IMilitaryStatusService militaryStatusService,
     IRecommendationService recommendationService, IAdditionalInfoService additionalInfoService
     )
 {
     _userInfoService       = userInfoService;
     _studentService        = studentService;
     _resumeService         = resumeService;
     _streamService         = streamService;
     _summaryService        = summaryService;
     _skillService          = skillService;
     _languageService       = languageService;
     _educationService      = educationService;
     _courseService         = courseService;
     _certificateService    = certificateService;
     _examService           = examService;
     _workExperienceService = workExperienceService;
     _portfolioService      = portfolioService;
     _militaryStatusService = militaryStatusService;
     _additionalInfoService = additionalInfoService;
     _recommendationService = recommendationService;
 }
Пример #11
0
        public static IServiceCollection AddIdentityServer(
            this IServiceCollection serviceCollection,
            IAppConfiguration appConfiguration,
            ICertificateService certificateService,
            ILogger logger,
            HostingOptions hostingOptions,
            IConnectionStrings connectionStrings)
        {
            serviceCollection.AddTransient <IProfileService, UserProfileService>();

            serviceCollection.AddTransient <ICorsPolicyProvider, FabricCorsPolicyProvider>();

            var identityServerBuilder = serviceCollection.AddIdentityServer(options =>
            {
                options.Events.RaiseSuccessEvents     = true;
                options.Events.RaiseFailureEvents     = true;
                options.Events.RaiseErrorEvents       = true;
                options.Events.RaiseInformationEvents = true;
                options.IssuerUri = appConfiguration.IssuerUri;
            });

            new IdentityServerInitializationService(
                identityServerBuilder,
                serviceCollection,
                appConfiguration,
                hostingOptions,
                connectionStrings,
                certificateService,
                logger).Initialize();

            return(serviceCollection);
        }
Пример #12
0
        public static bool IsValidated(out string errorMessage)
        {
            Company currentCompany = ((EInvoiceContext)FXContext.Current).CurrentCompany;

            errorMessage = null;
            try
            {
                ICertificateService _certSrv  = IoC.Resolve <ICertificateService>();
                KeyStores           _keyStore = KeyStoresManagement.GetKeyStore(currentCompany.id);
                if (_keyStore == null)
                {
                    errorMessage = "Chưa đăng ký chữ ký số, liên hệ nhà cung cấp để được hỗ trợ.";
                    return(false);
                }
                if (_keyStore.KeyStoresOf == 1)
                {
                    return(true);
                }
                System.Security.Cryptography.X509Certificates.X509Certificate2 cert = _keyStore.OpenSession();
                if (DateTime.Parse(cert.GetExpirationDateString()) <= DateTime.Today.AddDays(7))
                {
                    errorMessage = "Chữ ký số sắp hết hạn, liên hệ nhà cung cấp để được hỗ trợ.";
                    return(false);
                }
                return(true);
            }
            catch (Exception ex)
            {
                log.Error(ex);
                return(true);
            }
        }
Пример #13
0
 public BaseController(IEducationService educationService, ILangaugeService langaugeService, IMapper mapper, ICertificateService certificateService)
 {
     _educationService   = educationService;
     _mapper             = mapper;
     _langaugeService    = langaugeService;
     _certificateService = certificateService;
 }
 public CertificatesController(
     ICertificateService certificatesService, 
     ISpecialtiesService specialtiesService)
 {
     this.certificatesService = certificatesService;
     this.specialtiesService = specialtiesService;
 }
Пример #15
0
 public VerifyController()
 {
     currentCom = ((EInvoiceContext)FXContext.Current).CurrentCompany;
     iCer       = IoC.Resolve <ICertificateService>();
     //iGen = IoC.Resolve<IGeneratorINV>();
     iRepo = IoC.Resolve <IRepositoryINV>();
 }
 public EmployeeController(IEmployeeService employeeService,
                           IProfileAdjustmentService profileAdjustmentService,
                           ILanguageService languageService,
                           INationalityService nationalityService,
                           IRoleService roleService,
                           IFamilySituationService familySituationService,
                           ICertificateService certificateService,
                           IEmployeeCertificateService employeeCertificateService,
                           IExamService examService,
                           IEmployeeExamService employeeExamService,
                           ICourseService courseService,
                           IEmployeeCourseService employeeCourseService)
 {
     this.employeeService          = employeeService;
     this.profileAdjustmentService = profileAdjustmentService;
     this.languageService          = languageService;
     this.nationalityService       = nationalityService;
     this.roleService                = roleService;
     this.familySituationService     = familySituationService;
     this.certificateService         = certificateService;
     this.employeeCertificateService = employeeCertificateService;
     this.examService                = examService;
     this.employeeExamService        = employeeExamService;
     this.courseService              = courseService;
     this.employeeCourseService      = employeeCourseService;
 }
Пример #17
0
        public IAppConfiguration GetAppConfiguration(string baseBath, ICertificateService certificateService)
        {
            var appConfig = BuildAppConfiguration(baseBath);

            DecryptEncryptedValues(appConfig, certificateService);
            return(appConfig);
        }
Пример #18
0
        public ScriptPluginTests()
        {
            log = new Mock.Services.LogService(true);
            iis = new Mock.Clients.MockIISClient();
            cs  = new Mock.Services.CertificateService();
            var tempPath = Infrastructure.Directory.Temp();

            batchPath = new FileInfo(tempPath.FullName + "\\create.bat");
            File.WriteAllText(batchPath.FullName, "echo hello %1");

            psPath = new FileInfo(tempPath.FullName + "\\create.ps1");
            File.WriteAllText(psPath.FullName,
                              $"$arg = $($args[0])\n" +
                              $"if ($arg -ne $null -and $arg -ne \"world\") " +
                              $"{{ " +
                              $"  Write-Error \"Wrong: $arg\" " +
                              $"}} else {{" +
                              $"  Write-Host \"Hello $arg\" " +
                              $"}}"
                              );

            psNamedPath = new FileInfo(tempPath.FullName + "\\createnamed.ps1");
            File.WriteAllText(psNamedPath.FullName,
                              $"param([Parameter(Mandatory)][string]$What)\n" +
                              $"if ($What -ne \"world\") " +
                              $"{{ " +
                              $"  Write-Error \"Wrong: $What\" " +
                              $"}} else {{ " +
                              $"  Write-Host \"Hello $What\"" +
                              $"}}"
                              );
        }
Пример #19
0
 public SamlController(ISamlXMLSerializer authnRequestXMLSerializer, ISamlService samlService)
 {
     this.authnRequestXMLSerializer = authnRequestXMLSerializer;
     this.samlService              = samlService;
     this.certificateService       = new CertificateService();
     xmlSignatureValidationService = new XmlSignatureValidationService();
 }
Пример #20
0
 public SitecoreInitialise(
     ICertificateService certificateService,
     Pipeline <Node <IInitialiseProjectContext>, IInitialiseProjectContext> initialiseProjectPipeline) :
     base(initialiseProjectPipeline)
 {
     _certificateService = certificateService;
 }
Пример #21
0
        public ActionResult Edit(int id)
        {
            ICustomerService cusSrv = IoC.Resolve <ICustomerService>();
            Customer         oCus   = cusSrv.Getbykey(id);
            CustomerModel    model  = new CustomerModel();

            model.tmpCustomer = oCus;
            try
            {
                //thong tin ve khach hang
                model.SerialCert = oCus.SerialCert;
                if (oCus.SerialCert != null)
                {
                    ICertificateService _cerSVC = IoC.Resolve <ICertificateService>();
                    Certificate         cerQr   = (from c in _cerSVC.Query where c.SerialCert.ToUpper().Contains(oCus.SerialCert.ToUpper()) && (c.ComID == oCus.ComID) select c).SingleOrDefault();
                    model.Cerid     = cerQr.id;
                    model.serialcer = cerQr.SerialCert;
                }
            }
            catch (Exception ex)
            {
                log.Error(" Edit  -" + ex.Message);
            }
            return(View(model));
        }
        public void Setup()
        {
            certificateService = A.Fake <ICertificateService>();
            controller         =
                new ConfigurationController(
                    centresDataService,
                    mapsApiHelper,
                    logger,
                    imageResizeService,
                    certificateService
                    )
                .WithDefaultContext()
                .WithMockUser(true);

            A.CallTo(
                () => centresDataService.UpdateCentreWebsiteDetails(
                    A <int> ._,
                    A <string> ._,
                    A <double> ._,
                    A <double> ._,
                    A <string> ._,
                    A <string> ._,
                    A <string> ._,
                    A <string> ._,
                    A <string> ._,
                    A <string> ._,
                    A <string> ._
                    )
                ).DoesNothing();
        }
Пример #23
0
 public RenewalStoreDisk(
     ISettingsService settings, ILogService log,
     IInputService input, PasswordGenerator password,
     IPluginService plugin, ICertificateService certificateService) :
     base(settings, log, input, password, plugin, certificateService)
 {
 }
Пример #24
0
 public OrganizationsController(
     AuthenticationService authService,
     IMessageService messageService,
     IUserService userService,
     ITelemetryService telemetryService,
     ISecurityPolicyService securityPolicyService,
     ICertificateService certificateService,
     IPackageService packageService,
     IDeleteAccountService deleteAccountService,
     IContentObjectService contentObjectService,
     IMessageServiceConfiguration messageServiceConfiguration,
     IIconUrlProvider iconUrlProvider)
     : base(
         authService,
         packageService,
         messageService,
         userService,
         telemetryService,
         securityPolicyService,
         certificateService,
         contentObjectService,
         messageServiceConfiguration,
         deleteAccountService,
         iconUrlProvider)
 {
 }
Пример #25
0
 public Startup(IHostingEnvironment env)
 {
     _certificateService = MakeCertificateService();
     _appConfig          =
         new IdentityConfigurationProvider().GetAppConfiguration(env.ContentRootPath, _certificateService);
     _loggingLevelSwitch = new LoggingLevelSwitch();
     _logger             = LogFactory.CreateTraceLogger(_loggingLevelSwitch, _appConfig.ApplicationInsights);
 }
Пример #26
0
 public CertificateController(ApiClient apiClient,
                              ICertificateService certificateService,
                              ICertificate360Service certificate360Service)
 {
     _apiClient             = apiClient;
     _certificateService    = certificateService;
     _certificate360Service = certificate360Service;
 }
Пример #27
0
        public Startup(IConfiguration configuration)
        {
            _certificateService = IdentityConfigurationProvider.MakeCertificateService();
            var decryptionService = new DecryptionService(_certificateService);

            _appConfig =
                new IdentityConfigurationProvider(configuration).GetAppConfiguration(decryptionService);
        }
 public SavePkcs12Controller(IUnityContainer uc, IDialogService dlgService, ICertificateService certService)
     : base(uc, dlgService)
 {
     VM = uc.Resolve<SavePkcs12ViewModel>();
     _certService = certService;
     VM.ConfirmPasswort = "";
     VM.Passwort = "";
 }
Пример #29
0
 public AdminController(IEducationService educationService, ICertificateService certificateService, IComputerTechnologyService computerTechnologyService, IWorkExperienceService workExperienceService, ILangaugeService langaugeService, IMapper mapper)
     : base(educationService, langaugeService, mapper, certificateService)
 {
     _computerTechnologyService = computerTechnologyService;
     _workExperienceService     = workExperienceService;
     _mapper           = mapper;
     _educationService = educationService;
 }
Пример #30
0
 public ServerController(IServerInfoService ServerInfodb, IProviderService providerdb, ICertificateService Certificatedb, IMapper IMapper, IProjectInfoService Projectdb)
 {
     this.ServerInfodb  = ServerInfodb;
     this.providerdb    = providerdb;
     this.Certificatedb = Certificatedb;
     this.Projectdb     = Projectdb;
     this.IMapper       = IMapper;
 }
Пример #31
0
 public DefaultPlugin(ILogger logger, IAcmeClientService acmeClientService,
                      AcmeClient acmeClient, ICertificateService certificateService)
 {
     _logger             = logger;
     _acmeClientService  = acmeClientService;
     _acmeClient         = acmeClient;
     _certificateService = certificateService;
 }
 public ExamsController(IExamService examService, IOrderService orderService, ICertificateService certificateService, ICustomerService customerService, ISchoolService schoolService)
 {
     this.examService        = examService;
     this.orderService       = orderService;
     this.certificateService = certificateService;
     this.customerService    = customerService;
     this.schoolService      = schoolService;
 }
Пример #33
0
        public CertificateViewModel(ICertificateService certService, ILanguageService langService, IMapper mapService)
        {
            L = langService; certificateService = certService; mapper = mapService;
            GenerateCertificateCMD = new RelayCommand(GenerateCertificate);
            SaveCertificateCMD     = new RelayCommand(SaveCertificate);

            InitializeInfo();
        }
Пример #34
0
 public ApiService(IAzureClient azureClient, IFileSystem fs, ICertificateService certs, ISimpleCredentialStore credentialStore, 
     LoggingService log, JobScheduler jobScheduler, SigningJobCreator jobCreator)
 {
     _azure = azureClient.GetRoot();
     _azureClient = azureClient;
     _credentialStore = credentialStore;
     _log = log;
     _jobScheduler = jobScheduler;
     _jobCreator = jobCreator;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CertificateController"/> class.
 /// </summary>
 /// <param name="uc">The uc.</param>
 /// <param name="dlgService">The dialog service.</param>
 /// <param name="vm">The vm.</param>
 public CertificateController(IUnityContainer uc,
                              IDialogService dlgService,
                              CertificateViewModel vm,
                              IRegistrationService eZServ,
     ICertificateService certService)
     : base(dlgService)
 {
     _uc = uc;
     _vm = vm;
     _eZService = eZServ;
     _certService = certService;
 }
Пример #36
0
        public static CertificatesController GetInitialisedCertificatesController(ICertificateService certificateService)
        {
            var controller = new CertificatesController(certificateService)
            {
                Request = new HttpRequestMessage { RequestUri = new Uri(Url) },
                Configuration = new HttpConfiguration()
            };

            controller.Configuration.MapHttpAttributeRoutes();
            controller.Configuration.EnsureInitialized();

            return controller;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SendPOCController"/> class.
 /// </summary>
 /// <param name="uc">The uc.</param>
 /// <param name="dlgService">The dialog service.</param>
 /// <param name="vm">The vm.</param>
 public SendPOCController(IUnityContainer uc, IDialogService dlgService, SendPOCViewmodel vm, ICertificateService certServ, IeZustellService eZServ)
     : base(dlgService)
 {
     _uc = uc;
     _sendPocVM = vm;
     SendPocVM.ReceiverList = ReceiverViewModel.GetReceiverFromAddressBook(null, true);
     SendPocVM.SelectedReceiver = SendPocVM.ReceiverList[0];
     _eZServ = eZServ;
     _cerServ = certServ;
     SendPocVM.IsZustellungEnabled = true;
     if (_cerServ.Certificate == null)
     {
         SendPocVM.IsZustellungEnabled = false;
     }
 }
        public CertificatesController(ICertificateService certificateService)
        {
            Check.If(certificateService).IsNotNull();

            _certificateService = certificateService;
        }
 public CapturingService(ICertificateService certificateService, IKeyValuePersister<string,string> persister)
 {
     _persister = persister;
     _certificateService = certificateService;
 }
Пример #40
0
 public SigningJobCreator(IAzureClient azureClient, LoggingService log, ICertificateService certs)
 {
     _azureClient = azureClient;
     _log = log;
     _certs = certs;
 }
Пример #41
0
 public SamlResponseReader(ICertificateService certificates, IAssertionXmlDecryptor decryptor)
 {
     _certificates = certificates;
     _decryptor = decryptor;
 }
Пример #42
0
 public SamlResponseWriter(ICertificateService certificates, ISamlResponseXmlSigner xmlSigner, IAssertionXmlEncryptor encryptor)
 {
     _certificates = certificates;
     _xmlSigner = xmlSigner;
     _encryptor = encryptor;
 }
 public CertificateValidation(ICertificateService service)
 {
     _service = service;
 }