AzureAD / azure-activedirectory-identitymodel-extensions-for-dotnet

IdentityModel extensions for .Net
MIT License
1.06k stars 401 forks source link

Design a pool of 'ValidationResults' for the new validation model. #2744

Open brentschmaltz opened 3 months ago

brentschmaltz commented 3 months ago

The new model for Token Validation returns a TokenValidationResult that contains a list of a derived ValidationResult where each represents a particular validation. IssuerValidationResult, SignatureValidationResult, etc.

This could lead to a large number of objects that need to be GC'd for a service that performs a large number validation.

We can address this by developing a model were a ValidationResult is obtained from a pool, returned, reset and reused.

keegan-caruso commented 3 months ago

Would we be able to take a dependency on Microsoft.Extensions.ObjectPool?