Skip to content

Commit

Permalink
Disabling x-client-CPU (#4337)
Browse files Browse the repository at this point in the history
Co-authored-by: trwalke <[email protected]>
  • Loading branch information
trwalke and trwalke authored Oct 5, 2023
1 parent 9edbd9f commit b259cf0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
11 changes: 0 additions & 11 deletions src/client/Microsoft.Identity.Client/Internal/MsalIdHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ internal static class MsalIdParameter
/// </summary>
public const string Version = "x-client-Ver";

/// <summary>
/// CPU platform with x86, x64 or ARM as value
/// </summary>
public const string CpuPlatform = "x-client-CPU";

/// <summary>
/// Version of the operating system. This will not be sent on WinRT
/// </summary>
Expand Down Expand Up @@ -80,12 +75,6 @@ public static IDictionary<string, string> GetMsalIdParameters(ILoggerAdapter log
[MsalIdParameter.Version] = GetMsalVersion()
};

string processorInformation = platformProxy.GetProcessorArchitecture();
if (processorInformation != null)
{
parameters[MsalIdParameter.CpuPlatform] = processorInformation;
}

string osInformation = platformProxy.GetOperatingSystem();
if (osInformation != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1205,10 +1205,6 @@ private static void ValidateCommonQueryParams(
Assert.AreEqual(TestCommon.CreateDefaultServiceBundle().PlatformProxy.GetProductName(), qp["x-client-sku"]);
Assert.IsFalse(string.IsNullOrEmpty(qp["x-client-ver"]));
Assert.IsFalse(string.IsNullOrEmpty(qp["x-client-os"]));

#if DESKTOP
Assert.IsFalse(string.IsNullOrEmpty(qp["x-client-cpu"]));
#endif
}

[TestMethod]
Expand Down Expand Up @@ -1605,7 +1601,6 @@ public async Task GetAuthorizationRequestUrl_ReturnsUri_Async()
CoreAssert.AreEqual(TestConstants.RedirectUri, uriParams1["redirect_uri"], uriParams2["redirect_uri"]);
CoreAssert.AreEqual("select_account", uriParams1["prompt"], uriParams2["prompt"]);

Assert.AreEqual(uriParams1["x-client-CPU"], uriParams2["x-client-CPU"]);
Assert.AreEqual(uriParams1["x-client-OS"], uriParams2["x-client-OS"]);
Assert.AreEqual(uriParams1["x-client-Ver"], uriParams2["x-client-Ver"]);
Assert.AreEqual(uriParams1["x-client-SKU"], uriParams2["x-client-SKU"]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ private static void AssertHeaders(MockHttpMessageHandler headers, Guid correlati
typeof(PublicClientApplication).Assembly.GetName().Version.ToString(),
headers.ActualRequestMessage.Headers.GetValues("x-client-Ver").Single());

Assert.AreEqual(1, headers.ActualRequestMessage.Headers.GetValues("x-client-CPU").Count());
Assert.AreEqual(correlationId.ToString(), headers.ActualRequestMessage.Headers.GetValues("client-request-id").Single());
}
}
Expand Down

0 comments on commit b259cf0

Please sign in to comment.