/// <summary></summary> public IntegrationApiController(IConfiguration configuration, ITestLogic testLogic) { _testLogic = testLogic; var platformSettings = configuration.GetSection("Platform").Get <PlatformSettings>(); var tokenRefresher = new TokenRefresher(configuration, platformSettings.ClientId, platformSettings.ClientSecret); _integrationApiClient = new IntegrationApiRestClient(new HttpSender(platformSettings.IntegrationApiUrl, tokenRefresher.GetServiceClient())); }
public TokenRefresher(IConfiguration configuration, string clientId, string clientSecret) { _clientCredentials = new AuthenticationCredentials { ClientId = clientId, ClientSecret = clientSecret }; var platformSettings = configuration.GetSection("Platform").Get <PlatformSettings>(); _integrationApiClient = new IntegrationApiRestClient(new HttpSender(platformSettings.IntegrationApiUrl)); }
/// <summary></summary> public PlatformAuthenticationTestController(IConfiguration configuration, ITestLogic testLogic) : base(configuration, testLogic) { _platformSettings = configuration.GetSection("Platform").Get <PlatformSettings>(); _apiRestClient = new IntegrationApiRestClient(new HttpSender(_platformSettings.IntegrationApiUrl)); }