From c79125d647d50ee5c854b9d1baedc754e2f23f8f Mon Sep 17 00:00:00 2001 From: Kelly Song Date: Wed, 3 Apr 2024 14:55:51 -0700 Subject: [PATCH] formatting updates --- .../ValidatorUtilities.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.IdentityModel.Tokens/ValidatorUtilities.cs b/src/Microsoft.IdentityModel.Tokens/ValidatorUtilities.cs index eb00ee5841..482f2f3d37 100644 --- a/src/Microsoft.IdentityModel.Tokens/ValidatorUtilities.cs +++ b/src/Microsoft.IdentityModel.Tokens/ValidatorUtilities.cs @@ -30,16 +30,23 @@ internal static void ValidateLifetime(DateTime? notBefore, DateTime? expires, Se if (notBefore.HasValue && expires.HasValue && (notBefore.Value > expires.Value)) throw LogHelper.LogExceptionMessage(new SecurityTokenInvalidLifetimeException(LogHelper.FormatInvariant(LogMessages.IDX10224, LogHelper.MarkAsNonPII(notBefore.Value), LogHelper.MarkAsNonPII(expires.Value))) - { NotBefore = notBefore, Expires = expires }); + { + NotBefore = notBefore, + Expires = expires + }); DateTime utcNow = DateTime.UtcNow; if (notBefore.HasValue && (notBefore.Value > DateTimeUtil.Add(utcNow, validationParameters.ClockSkew))) throw LogHelper.LogExceptionMessage(new SecurityTokenNotYetValidException(LogHelper.FormatInvariant(LogMessages.IDX10222, LogHelper.MarkAsNonPII(notBefore.Value), LogHelper.MarkAsNonPII(utcNow))) - { NotBefore = notBefore.Value }); + { + NotBefore = notBefore.Value + }); if (expires.HasValue && (expires.Value < DateTimeUtil.Add(utcNow, validationParameters.ClockSkew.Negate()))) throw LogHelper.LogExceptionMessage(new SecurityTokenExpiredException(LogHelper.FormatInvariant(LogMessages.IDX10223, LogHelper.MarkAsNonPII(expires.Value), LogHelper.MarkAsNonPII(utcNow))) - { Expires = expires.Value }); + { + Expires = expires.Value + }); // if it reaches here, that means lifetime of the token is valid LogHelper.LogInformation(LogMessages.IDX10239);