From 39c3ac2419f4aa0380567b8cdeb19d70f4740ce1 Mon Sep 17 00:00:00 2001 From: "REDMOND\\nguyencuong" Date: Wed, 19 Jun 2024 18:15:56 +0100 Subject: [PATCH] Increase number of properties --- .../Json/OpenIdConnectConfigurationSerializer.cs | 2 +- .../ConfigurationManagerTests.cs | 4 ++-- .../EmptyJsonWebKeySet.json | 3 +++ ...crosoft.IdentityModel.Protocols.OpenIdConnect.Tests.csproj | 2 +- .../OpenIdConnectConfigurationTests.cs | 4 ++-- 5 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/EmptyJsonWebKeySet.json diff --git a/src/Microsoft.IdentityModel.Protocols.OpenIdConnect/Json/OpenIdConnectConfigurationSerializer.cs b/src/Microsoft.IdentityModel.Protocols.OpenIdConnect/Json/OpenIdConnectConfigurationSerializer.cs index 0a14496e7e..f5c9d732d6 100644 --- a/src/Microsoft.IdentityModel.Protocols.OpenIdConnect/Json/OpenIdConnectConfigurationSerializer.cs +++ b/src/Microsoft.IdentityModel.Protocols.OpenIdConnect/Json/OpenIdConnectConfigurationSerializer.cs @@ -824,7 +824,7 @@ public static void Write(ref Utf8JsonWriter writer, OpenIdConnectConfiguration c if (config.UserInfoEndpointSigningAlgValuesSupported.Count > 0) JsonPrimitives.WriteStrings(ref writer, Utf8Bytes.UserInfoSigningAlgValuesSupported, config.UserInfoEndpointSigningAlgValuesSupported); - + if (config.AdditionalData.Count > 0) JsonPrimitives.WriteObjects(ref writer, config.AdditionalData); diff --git a/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/ConfigurationManagerTests.cs b/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/ConfigurationManagerTests.cs index d461b07b8c..382daaa3b7 100644 --- a/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/ConfigurationManagerTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/ConfigurationManagerTests.cs @@ -634,7 +634,7 @@ public static TheoryData - + PreserveNewest diff --git a/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectConfigurationTests.cs b/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectConfigurationTests.cs index c86c4c417e..8922ac804a 100644 --- a/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectConfigurationTests.cs +++ b/test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/OpenIdConnectConfigurationTests.cs @@ -162,8 +162,8 @@ public void GetSets() OpenIdConnectConfiguration configuration = new OpenIdConnectConfiguration(); Type type = typeof(OpenIdConnectConfiguration); PropertyInfo[] properties = type.GetProperties(); - if (properties.Length != 67) - Assert.True(false, "Number of properties has changed from 67 to: " + properties.Length + ", adjust tests"); + if (properties.Length != 68) + Assert.True(false, "Number of properties has changed from 68 to: " + properties.Length + ", adjust tests"); TestUtilities.CallAllPublicInstanceAndStaticPropertyGets(configuration, "OpenIdConnectConfiguration_GetSets");