Skip to content

Commit

Permalink
Making RequestObjectFetchAdapters scoped
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-abblix committed Nov 5, 2024
1 parent efbcf10 commit 7be6e95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Abblix.Oidc.Server/Endpoints/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ public static IServiceCollection AddAuthorizationRequestFetchers(this IServiceCo
.AddSingleton<IJsonObjectBinder, JsonSerializationBinder>()

// Add individual authorization request fetchers as singletons
.AddSingleton<IAuthorizationRequestFetcher, PushedRequestFetcher>()
.AddSingleton<IAuthorizationRequestFetcher, RequestUriFetcher>()
.AddSingleton<IAuthorizationRequestFetcher, Authorization.RequestFetching.RequestObjectFetchAdapter>()
.AddScoped<IAuthorizationRequestFetcher, PushedRequestFetcher>()
.AddScoped<IAuthorizationRequestFetcher, RequestUriFetcher>()
.AddScoped<IAuthorizationRequestFetcher, Authorization.RequestFetching.RequestObjectFetchAdapter>()

// Compose the individual fetchers into a composite fetcher
.Compose<IAuthorizationRequestFetcher, Authorization.RequestFetching.CompositeRequestFetcher>();
Expand Down
2 changes: 1 addition & 1 deletion Abblix.Oidc.Server/Features/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public static IServiceCollection AddUserInfo(this IServiceCollection services)
/// modifications and additions to be chained.</returns>
public static IServiceCollection AddRequestObject(this IServiceCollection services)
{
services.TryAddSingleton<IRequestObjectFetcher, RequestObjectFetcher>();
services.TryAddScoped<IRequestObjectFetcher, RequestObjectFetcher>();
return services;
}

Expand Down

0 comments on commit 7be6e95

Please sign in to comment.