From 8850ac4ac91eeefc96e5fc3ebecd91027a400fde Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Mon, 6 Jan 2025 16:08:45 +0100 Subject: [PATCH] =?UTF-8?q?refactor(DIExtensions):=20Methode=20AddJwtSigna?= =?UTF-8?q?tureHandler=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalData.Core.Security/DIExtensions.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DigitalData.Core.Security/DIExtensions.cs b/DigitalData.Core.Security/DIExtensions.cs index cd8571f..6d1c318 100644 --- a/DigitalData.Core.Security/DIExtensions.cs +++ b/DigitalData.Core.Security/DIExtensions.cs @@ -60,5 +60,9 @@ namespace DigitalData.Core.Security return services.AddSingleton(sp => Options.Create(descriptor)); } + + public static IServiceCollection AddJwtSignatureHandler(this IServiceCollection services, Func>? claimsMapper = null, Func? subjectMapper = null) => services + .AddClaimDescriptor(claimsMapper: claimsMapper, subjectMapper: subjectMapper) + .AddSingleton, JwtSignatureHandler>(); } } \ No newline at end of file