From 5de1dc84b49f53174894893a5dfb5ee86c75f5b2 Mon Sep 17 00:00:00 2001 From: Ignacio Inglese Date: Thu, 26 Sep 2024 15:55:03 +0100 Subject: [PATCH] Remove TransformBeforeSignatureValidationDelegate from ValidationParameters (#2848) * Removed TransformBeforeSignatureValidationDelegate from ValidationParameters since it is not used in the new path * Removed delegate definition --- src/Microsoft.IdentityModel.Tokens/Delegates.cs | 8 -------- .../Validation/ValidationParameters.cs | 6 ------ 2 files changed, 14 deletions(-) diff --git a/src/Microsoft.IdentityModel.Tokens/Delegates.cs b/src/Microsoft.IdentityModel.Tokens/Delegates.cs index 6977faf180..a0a93f4a0a 100644 --- a/src/Microsoft.IdentityModel.Tokens/Delegates.cs +++ b/src/Microsoft.IdentityModel.Tokens/Delegates.cs @@ -205,13 +205,5 @@ namespace Microsoft.IdentityModel.Tokens /// This method is not expected to throw. /// The validated . internal delegate ValidationResult SignatureValidationDelegate(SecurityToken token, ValidationParameters validationParameters, BaseConfiguration? configuration, CallContext? callContext); - - /// - /// Transforms the security token before signature validation. - /// - /// The being validated. - /// The to be used for validating the token. - /// The transformed . - internal delegate SecurityToken TransformBeforeSignatureValidationDelegate(SecurityToken token, ValidationParameters validationParameters); #nullable restore } diff --git a/src/Microsoft.IdentityModel.Tokens/Validation/ValidationParameters.cs b/src/Microsoft.IdentityModel.Tokens/Validation/ValidationParameters.cs index 96bd08d62d..f0c15b4adc 100644 --- a/src/Microsoft.IdentityModel.Tokens/Validation/ValidationParameters.cs +++ b/src/Microsoft.IdentityModel.Tokens/Validation/ValidationParameters.cs @@ -88,7 +88,6 @@ protected ValidationParameters(ValidationParameters other) TokenDecryptionKeys = other.TokenDecryptionKeys; TokenReplayCache = other.TokenReplayCache; TokenReplayValidator = other.TokenReplayValidator; - TransformBeforeSignatureValidation = other.TransformBeforeSignatureValidation; TypeValidator = other.TypeValidator; ValidateActor = other.ValidateActor; ValidateSignatureLast = other.ValidateSignatureLast; @@ -319,11 +318,6 @@ public IssuerValidationDelegateAsync IssuerValidatorAsync set { _issuerValidatorAsync = value ?? throw new ArgumentNullException(nameof(value), "IssuerValidatorAsync cannot be set as null."); } } - /// - /// Gets or sets a delegate that will be called to transform a token to a supported format before validation. - /// - public TransformBeforeSignatureValidationDelegate TransformBeforeSignatureValidation { get; set; } - /// /// Allows overriding the delegate that will be used to validate the lifetime of the token ///