Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Brent Schmaltz authored and brentschmaltz committed Dec 5, 2023
1 parent f40dd90 commit ab18767
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -682,10 +682,10 @@ int sizeOfEncodedHeaderAndPayloadAsciiBytes
/// A <see cref="SecurityTokenDescriptor"/> can contain claims from multiple locations.
/// This method consolidates the claims and adds default times {exp, iat, nbf} if needed.
/// </summary>
/// <param name="writer"></param>
/// <param name="tokenDescriptor"></param>
/// <param name="setDefaultTimesOnTokenCreation"></param>
/// <param name="tokenLifetimeInMinutes"></param>
/// <param name="writer">The <see cref="Utf8JsonWriter"/> to use.</param>
/// <param name="tokenDescriptor">The <see cref="SecurityTokenDescriptor"/> used to create the token.</param>
/// <param name="setDefaultTimesOnTokenCreation">A boolean that controls if expiration, notbefore, issuedat should be added if missing.</param>
/// <param name="tokenLifetimeInMinutes">The default value for the token lifetime in minutes.</param>
/// <returns>A dictionary of claims.</returns>
internal static void WriteJwsPayload(
ref Utf8JsonWriter writer,
Expand Down Expand Up @@ -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<string,object>, whereas SeSecurityTokenDescriptor.Subject.Claims are System.Security.Claims.Claim and are processed differently.
// SecurityTokenDescriptor.Claims are KeyValuePairs<string,object>, whereas SecurityTokenDescriptor.Subject.Claims are System.Security.Claims.Claim and are processed differently.

if (tokenDescriptor.Claims != null && tokenDescriptor.Claims.Count > 0)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.IdentityModel.Tokens/SupportedAlgorithms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// </summary>
/// <param name="algorithm"></param>
/// <param name="algorithm">The security algorithm to find the maximum size.</param>
/// <returns>Set size for known algorithms, 2K default.</returns>
internal static int GetMaxByteCount(string algorithm) => algorithm switch
{
Expand Down

0 comments on commit ab18767

Please sign in to comment.