コード例 #1
0
 /// <summary>
 /// Creates a new instance of the FhrsController.
 /// We should be catching exceptions globally and returning an appropriate API status code, simple implementation here.
 /// </summary>
 /// <param name="httpClientServiceFactory"></param>
 /// <param name="cacheService"></param>
 /// <param name="configurationOptions"></param>
 public AuthorityController(IHttpClientServiceFactory httpClientServiceFactory, ICacheService cacheService, IOptions <ApiConfigurationOption> configurationOptions) : base(cacheService, configurationOptions)
 {
     _httpClientServiceFactory = httpClientServiceFactory ?? throw new ArgumentNullException(nameof(httpClientServiceFactory));
 }
 /// <summary>
 /// Constructor of the <see cref="SampleIdentityServer4AuthController"/>
 /// </summary>
 /// <param name="testApiService">The <see cref="IHttpClientServiceFactory"/> that was register in <see cref="Startup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)"/></param>
 public SampleGetRequestController(IHttpClientServiceFactory requestServiceFactory)
 {
     _requestServiceFactory = requestServiceFactory;
 }
 /// <summary>
 /// Constructor for the <see cref="TestApiService"/>.
 /// </summary>
 /// <param name="logger">The logger</param>
 /// <param name="requestServiceFactory">The <see cref="IHttpClientServiceFactory"/> that will perform the request to the protected resource.</param>
 /// <param name="identityServerOptions">The identity server options that will used to retrieve an access token.</param>
 public ClientCredentialsProtectedResourceService(ILogger <ClientCredentialsProtectedResourceService> logger, IHttpClientServiceFactory requestServiceFactory, IOptions <SomeClientCredentialsOptions> identityServerOptions)
 {
     _logger = logger;
     _requestServiceFactory = requestServiceFactory;
     _identityServerOptions = identityServerOptions;
 }
 /// <summary>
 /// Constructor of the <see cref="IntegrationTestsController"/>
 /// </summary>
 /// <param name="protectedResourceService"></param>
 public IntegrationTestsController(IHttpClientServiceFactory requestServiceFactory)
 {
     httpClientService = requestServiceFactory
                         .CreateHttpClientService()
                         .SetIdentityServerOptions("ProtectedResourceClientCredentialsOptions");
 }
 /// <summary>
 /// Constructor of the <see cref="IntegrationTestsController"/>
 /// </summary>
 /// <param name="protectedResourceService"></param>
 public IntegrationTestsController(IHttpClientServiceFactory requestServiceFactory)
 {
     httpClientService = requestServiceFactory
                         .CreateHttpClientService();
 }
コード例 #6
0
 /// <summary>
 /// Constructor of the <see cref="SampleIdentityServer4AuthController"/>
 /// </summary>
 /// <param name="testApiService"></param>
 public SampleIdentityServer4AuthController(IHttpClientServiceFactory requestServiceFactory)
 {
     _requestServiceFactory = requestServiceFactory;
 }
コード例 #7
0
 public RestService(IHttpClientServiceFactory httpClientServiceFactory)
 {
     _httpClientServiceFactory = httpClientServiceFactory;
 }
コード例 #8
0
 /// <summary>
 /// Constructor of the <see cref="SampleIdentityServer4AuthController"/>
 /// </summary>
 /// <param name="testApiService"></param>
 public SampleSetHeadersController(IHttpClientServiceFactory requestServiceFactory)
 {
     _requestServiceFactory = requestServiceFactory;
 }
 /// <summary>
 /// Constructor for the <see cref="TestApiService"/>.
 /// </summary>
 /// <param name="logger">The logger</param>
 /// <param name="requestServiceFactory">The <see cref="IHttpClientServiceFactory"/> that will perform the request to the protected resource.</param>
 /// <param name="identityServerOptions">The identity server options that will used to retrieve an access token.</param>
 public PasswordProtectedResourceService(ILogger <PasswordProtectedResourceService> logger, IHttpClientServiceFactory requestServiceFactory, IOptions <SomePasswordOptions> identityServerOptions)
 {
     _logger                = logger;
     _requestService        = requestServiceFactory.CreateHttpClientService();
     _identityServerOptions = identityServerOptions;
 }