diff --git a/src/FactSet.SDK.Utils/Authentication/ConfidentialClient.cs b/src/FactSet.SDK.Utils/Authentication/ConfidentialClient.cs index 01d9984..629c84a 100644 --- a/src/FactSet.SDK.Utils/Authentication/ConfidentialClient.cs +++ b/src/FactSet.SDK.Utils/Authentication/ConfidentialClient.cs @@ -123,9 +123,9 @@ private HttpClient InitClient(HttpClient httpClient) { return new HttpClient(); } - + httpClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", Constants.USER_AGENT); - + return httpClient; } diff --git a/src/FactSet.SDK.Utils/Authentication/Constants.cs b/src/FactSet.SDK.Utils/Authentication/Constants.cs index 59719fb..9df4c26 100644 --- a/src/FactSet.SDK.Utils/Authentication/Constants.cs +++ b/src/FactSet.SDK.Utils/Authentication/Constants.cs @@ -30,7 +30,7 @@ public static class Constants #pragma warning disable S1075 // URIs should not be hardcoded public static readonly string FACTSET_WELL_KNOWN_URI = "https://auth.factset.com/.well-known/openid-configuration"; #pragma warning restore S1075 // URIs should not be hardcoded - + private static String GetOSType() { if (RuntimeInformation.OSDescription.StartsWith("Microsoft Windows")) diff --git a/tests/FactSet.SDK.Utils.Tests/Authentication/ConfidentialClientTests.cs b/tests/FactSet.SDK.Utils.Tests/Authentication/ConfidentialClientTests.cs index b5f129c..f14b19f 100644 --- a/tests/FactSet.SDK.Utils.Tests/Authentication/ConfidentialClientTests.cs +++ b/tests/FactSet.SDK.Utils.Tests/Authentication/ConfidentialClientTests.cs @@ -243,7 +243,7 @@ public async Task HttpClient_UserAgent_ContainsCorrectAgent() Path.Join(_resourcesPath, "validConfigGeneratedSample.txt"), mockClient ); - + Assert.That(_capturedRequest.Headers.UserAgent.ToString(), Is.EqualTo(Constants.USER_AGENT)); }