Skip to content

Commit

Permalink
Add property named differently in 7x. (#2756)
Browse files Browse the repository at this point in the history
Co-authored-by: id4s <[email protected]>
  • Loading branch information
brentschmaltz and HP712 authored Aug 1, 2024
1 parent b6355d3 commit 1491481
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Microsoft.IdentityModel.Tokens/AppContextSwitches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/// <summary>
/// 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.
Expand Down

0 comments on commit 1491481

Please sign in to comment.