From ab1876777abdbbe315553b77f6617d66089b02c5 Mon Sep 17 00:00:00 2001 From: Brent Schmaltz Date: Tue, 5 Dec 2023 10:11:48 -0800 Subject: [PATCH] address PR comments --- .../JsonWebTokenHandler.CreateToken.cs | 10 +++++----- .../SupportedAlgorithms.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Microsoft.IdentityModel.JsonWebTokens/JsonWebTokenHandler.CreateToken.cs b/src/Microsoft.IdentityModel.JsonWebTokens/JsonWebTokenHandler.CreateToken.cs index 84be41f744..4cd4f53a2d 100644 --- a/src/Microsoft.IdentityModel.JsonWebTokens/JsonWebTokenHandler.CreateToken.cs +++ b/src/Microsoft.IdentityModel.JsonWebTokens/JsonWebTokenHandler.CreateToken.cs @@ -682,10 +682,10 @@ int sizeOfEncodedHeaderAndPayloadAsciiBytes /// A can contain claims from multiple locations. /// This method consolidates the claims and adds default times {exp, iat, nbf} if needed. /// - /// - /// - /// - /// + /// The to use. + /// The used to create the token. + /// A boolean that controls if expiration, notbefore, issuedat should be added if missing. + /// The default value for the token lifetime in minutes. /// A dictionary of claims. internal static void WriteJwsPayload( ref Utf8JsonWriter writer, @@ -743,7 +743,7 @@ internal static void WriteJwsPayload( // Duplicates are resolved according to the following priority: // SecurityTokenDescriptor.{Audience, Issuer, Expires, IssuedAt, NotBefore}, SecurityTokenDescriptor.Claims, SecurityTokenDescriptor.Subject.Claims - // SecurityTokenDescriptor.Claims are KeyValuePairs, whereas SeSecurityTokenDescriptor.Subject.Claims are System.Security.Claims.Claim and are processed differently. + // SecurityTokenDescriptor.Claims are KeyValuePairs, whereas SecurityTokenDescriptor.Subject.Claims are System.Security.Claims.Claim and are processed differently. if (tokenDescriptor.Claims != null && tokenDescriptor.Claims.Count > 0) { diff --git a/src/Microsoft.IdentityModel.Tokens/SupportedAlgorithms.cs b/src/Microsoft.IdentityModel.Tokens/SupportedAlgorithms.cs index 0735b9dbb8..086374360a 100644 --- a/src/Microsoft.IdentityModel.Tokens/SupportedAlgorithms.cs +++ b/src/Microsoft.IdentityModel.Tokens/SupportedAlgorithms.cs @@ -363,7 +363,7 @@ internal static bool IsSupportedSymmetricAlgorithm(string algorithm) /// Returns the maximum size in bytes for a supported signature algorithms. /// The key size affects the signature size for asymmetric algorithms. /// - /// + /// The security algorithm to find the maximum size. /// Set size for known algorithms, 2K default. internal static int GetMaxByteCount(string algorithm) => algorithm switch {