feat: DependentExtensions für extensions mit Abhängigkeiten hinzugefügt

- Methoden `AddDependentExtensions` und `TryGetByRoute` hinzugefügt, um die Konfiguration von `AuthApiParams` und das Abrufen von Deskriptoren zu ermöglichen.
This commit is contained in:
Developer 02
2025-01-21 15:23:22 +01:00
parent 110b102926
commit a1f996b328
2 changed files with 42 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ using Microsoft.IdentityModel.JsonWebTokens;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
using System.Security.Claims;
using static System.Net.Mime.MediaTypeNames;
var builder = WebApplication.CreateBuilder(args);
@@ -116,6 +117,8 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
var app = builder.Build();
app.AddDependentExtensions();
issuerSigningKeyInitiator = new Lazy<SecurityKey>(() =>
{
var factory = app.Services.GetRequiredService<ICryptoFactory>();