From 9f8753b810456e90bb8d6c295f4d0363a64b07fc Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Thu, 5 Dec 2024 22:28:38 +1100 Subject: [PATCH] remove redundant Distinct --- .../Mappers/AllowedSigningAlgorithmsConverter.cs | 2 +- src/IdentityServer/Extensions/TokenExtensions.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/EntityFramework.Storage/Mappers/AllowedSigningAlgorithmsConverter.cs b/src/EntityFramework.Storage/Mappers/AllowedSigningAlgorithmsConverter.cs index 3583e0fe8..20d2c7879 100644 --- a/src/EntityFramework.Storage/Mappers/AllowedSigningAlgorithmsConverter.cs +++ b/src/EntityFramework.Storage/Mappers/AllowedSigningAlgorithmsConverter.cs @@ -25,7 +25,7 @@ public static ICollection Convert(string sourceMember) if (!String.IsNullOrWhiteSpace(sourceMember)) { sourceMember = sourceMember.Trim(); - foreach (var item in sourceMember.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Distinct()) + foreach (var item in sourceMember.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) { list.Add(item); } diff --git a/src/IdentityServer/Extensions/TokenExtensions.cs b/src/IdentityServer/Extensions/TokenExtensions.cs index 0272a421c..beadc6a4c 100644 --- a/src/IdentityServer/Extensions/TokenExtensions.cs +++ b/src/IdentityServer/Extensions/TokenExtensions.cs @@ -92,8 +92,7 @@ public static Dictionary CreateJwtPayloadDictionary(this Token t var simpleClaimTypes = token.Claims.Where(c => c.Type != JwtClaimTypes.AuthenticationMethod && c.Type != JwtClaimTypes.Scope) - .Select(c => c.Type) - .Distinct(); + .Select(c => c.Type); // other claims foreach (var claimType in simpleClaimTypes)