Example #1
0
 public OAuthHelper(IOAuthClientSettings settings, IInProcessCache inProcessCache,
                    IClaimProcessor claimProcessor)
 {
     Settings       = settings;
     InProcessCache = inProcessCache;
     ClaimProcessor = claimProcessor ?? new StraightThroughClaimProcessor();
 }
        public HmrcService(
            IHmrcConfiguration configuration,
            IHttpClientWrapper httpClientWrapper,
            IApprenticeshipLevyApiClient apprenticeshipLevyApiClient,
            ITokenServiceApiClient tokenServiceApiClient,
            [RequiredPolicy(HmrcExecutionPolicy.Name)]
            ExecutionPolicy.ExecutionPolicy executionPolicy,
            IInProcessCache inProcessCache,
            IAzureAdAuthenticationService azureAdAuthenticationService,
            ILog log)
        {
            _configuration                = configuration;
            _httpClientWrapper            = httpClientWrapper;
            _apprenticeshipLevyApiClient  = apprenticeshipLevyApiClient;
            _tokenServiceApiClient        = tokenServiceApiClient;
            _executionPolicy              = executionPolicy;
            _inProcessCache               = inProcessCache;
            _azureAdAuthenticationService = azureAdAuthenticationService;
            _log = log;

            _httpClientWrapper.BaseUrl    = _configuration.BaseUrl;
            _httpClientWrapper.AuthScheme = "Bearer";
            _httpClientWrapper.MediaTypeWithQualityHeaderValueList = new List <MediaTypeWithQualityHeaderValue> {
                new MediaTypeWithQualityHeaderValue("application/vnd.hmrc.1.0+json")
            };
        }
Example #3
0
 public PaymentService(IPaymentsEventsApiClient paymentsEventsApiClient,
                       IEmployerCommitmentApi commitmentsApiClient, IApprenticeshipInfoServiceWrapper apprenticeshipInfoService,
                       IMapper mapper, ILog logger, IInProcessCache inProcessCache, IProviderService providerService)
 {
     _paymentsEventsApiClient   = paymentsEventsApiClient;
     _commitmentsApiClient      = commitmentsApiClient;
     _apprenticeshipInfoService = apprenticeshipInfoService;
     _mapper          = mapper;
     _logger          = logger;
     _inProcessCache  = inProcessCache;
     _providerService = providerService;
 }
 public ReferenceDataService(
     IReferenceDataApiClient client,
     IMapper mapper,
     IInProcessCache inProcessCache,
     ILog logger)
 {
     _client         = client;
     _mapper         = mapper;
     _inProcessCache = inProcessCache;
     _identifiableOrganisationTypes = new Lazy <Task <CommonOrganisationType[]> >(InitialiseOrganisationTypes);
     _logger = logger;
 }
Example #5
0
 public ApprenticeshipInfoServiceWrapper(IInProcessCache cache, EmployerApprenticeshipsServiceConfiguration config)
 {
     _cache = cache ?? throw new ArgumentNullException(nameof(cache));
     _apprenticeshipInfoServiceApiBase = config?.ApprenticeshipInfoService?.BaseUrl;
 }
Example #6
0
 public ProviderServiceCache(IProviderService providerService, IInProcessCache inProcessCache)
 {
     _providerService = providerService;
     _inProcessCache  = inProcessCache;
 }
Example #7
0
 public MultiVariantTestingService(IInProcessCache inProcessCache, ILog logger)
 {
     _inProcessCache = inProcessCache;
     Logger          = logger;
 }
 public ApprenticeshipInfoServiceWrapper(IInProcessCache cache, IApiClient apiClient)
 {
     _cache     = cache ?? throw new ArgumentNullException(nameof(cache));
     _apiClient = apiClient;
 }
Example #9
0
 public MultiVariantTestingService(IInProcessCache inProcessCache, ILog logger, IAutoConfigurationService autoConfigurationService) : base(autoConfigurationService)
 {
     _inProcessCache = inProcessCache;
     Logger          = logger;
 }