From b94ffbc46063dbcac007543463f1cbe5925193a4 Mon Sep 17 00:00:00 2001 From: id4s Date: Wed, 31 Jul 2024 09:26:21 -0700 Subject: [PATCH] Add property named differently in 7x. --- src/Microsoft.IdentityModel.Tokens/AppContextSwitches.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Microsoft.IdentityModel.Tokens/AppContextSwitches.cs b/src/Microsoft.IdentityModel.Tokens/AppContextSwitches.cs index 069ec2c1ee..0105963f08 100644 --- a/src/Microsoft.IdentityModel.Tokens/AppContextSwitches.cs +++ b/src/Microsoft.IdentityModel.Tokens/AppContextSwitches.cs @@ -38,6 +38,10 @@ internal static class AppContextSwitches internal static bool DontFailOnMissingTid => _doNotFailOnMissingTid ??= (AppContext.TryGetSwitch(DoNotFailOnMissingTidSwitch, out bool doNotFailOnMissingTid) && doNotFailOnMissingTid); + // 7x was released with the property name "DoNotFailOnMissingTid" 8x was released with "DontFailOnMissingTid" + // This is to ensure that both property names are supported. + internal static bool DoNotFailOnMissingTid => DontFailOnMissingTid; + /// /// When reading claims from the token, specifies whether to try to convert all string claims to DateTime. /// Some claims are known not to be DateTime, so conversion is skipped.