Skip to content

Commit

Permalink
Addressing feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Franco Fung committed Jul 11, 2024
1 parent ccf0c38 commit bbcf535
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Linq;
using Microsoft.IdentityModel.Logging;

#nullable enable
namespace Microsoft.IdentityModel.Tokens
{
public static partial class Validators
Expand Down Expand Up @@ -45,15 +46,20 @@ public static void ValidateAlgorithm(string algorithm, SecurityKey securityKey,
}

/// <summary>
/// Validates a given algorithm for a <see cref="SecurityKey"/>.
/// Validates a given algorithm for a <see cref="SecurityKey"/> is valid, if given.
/// </summary>
/// <param name="algorithm">The algorithm to be validated.</param>
/// <param name="securityKey">The <see cref="SecurityKey"/> that signed the <see cref="SecurityToken"/>.</param>
/// <param name="securityToken">The <see cref="SecurityToken"/> being validated.</param>
/// <param name="validationParameters"><see cref="TokenValidationParameters"/> required for validation.</param>
/// <param name="callContext"></param>
#pragma warning disable CA1801 // TODO: remove pragma disable once callContext is used for logging
internal static AlgorithmValidationResult ValidateAlgorithm(string algorithm, SecurityKey securityKey, SecurityToken securityToken, TokenValidationParameters validationParameters, CallContext callContext)
internal static AlgorithmValidationResult ValidateAlgorithm(
string algorithm,
SecurityKey securityKey,
SecurityToken securityToken,
TokenValidationParameters validationParameters,
CallContext? callContext)
#pragma warning restore CA1801 // TODO: remove pragma disable once callContext is used for logging
{
if (validationParameters == null)
Expand Down Expand Up @@ -105,3 +111,4 @@ internal static AlgorithmValidationResult ValidateAlgorithm(string algorithm, Se
}
}
}
#nullable restore

0 comments on commit bbcf535

Please sign in to comment.