From 7be6e95277d6461d041ae52938e24963014bea83 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Tue, 5 Nov 2024 17:38:07 +0300 Subject: [PATCH] Making RequestObjectFetchAdapters scoped --- Abblix.Oidc.Server/Endpoints/ServiceCollectionExtensions.cs | 6 +++--- Abblix.Oidc.Server/Features/ServiceCollectionExtensions.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Abblix.Oidc.Server/Endpoints/ServiceCollectionExtensions.cs b/Abblix.Oidc.Server/Endpoints/ServiceCollectionExtensions.cs index f07f282..ad5b5ec 100644 --- a/Abblix.Oidc.Server/Endpoints/ServiceCollectionExtensions.cs +++ b/Abblix.Oidc.Server/Endpoints/ServiceCollectionExtensions.cs @@ -95,9 +95,9 @@ public static IServiceCollection AddAuthorizationRequestFetchers(this IServiceCo .AddSingleton() // Add individual authorization request fetchers as singletons - .AddSingleton() - .AddSingleton() - .AddSingleton() + .AddScoped() + .AddScoped() + .AddScoped() // Compose the individual fetchers into a composite fetcher .Compose(); diff --git a/Abblix.Oidc.Server/Features/ServiceCollectionExtensions.cs b/Abblix.Oidc.Server/Features/ServiceCollectionExtensions.cs index f305dfe..e3f91b9 100644 --- a/Abblix.Oidc.Server/Features/ServiceCollectionExtensions.cs +++ b/Abblix.Oidc.Server/Features/ServiceCollectionExtensions.cs @@ -404,7 +404,7 @@ public static IServiceCollection AddUserInfo(this IServiceCollection services) /// modifications and additions to be chained. public static IServiceCollection AddRequestObject(this IServiceCollection services) { - services.TryAddSingleton(); + services.TryAddScoped(); return services; }