Skip to content

Commit

Permalink
Use AddIndexProvider() for OpenId (#16952)
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco authored Nov 5, 2024
1 parent d5a4d64 commit 49b2431
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,10 @@ public static OpenIddictCoreBuilder UseYesSql(this OpenIddictCoreBuilder builder
builder.Services.TryAddScoped(typeof(OpenIdScopeStore<>));
builder.Services.TryAddScoped(typeof(OpenIdTokenStore<>));

builder.Services.TryAddEnumerable(new[]
{
ServiceDescriptor.Singleton<IIndexProvider, OpenIdApplicationIndexProvider>(),
ServiceDescriptor.Singleton<IIndexProvider, OpenIdAuthorizationIndexProvider>(),
ServiceDescriptor.Singleton<IIndexProvider, OpenIdScopeIndexProvider>(),
ServiceDescriptor.Singleton<IIndexProvider, OpenIdTokenIndexProvider>()
});
builder.Services.AddIndexProvider<OpenIdApplicationIndexProvider>();
builder.Services.AddIndexProvider<OpenIdAuthorizationIndexProvider>();
builder.Services.AddIndexProvider<OpenIdScopeIndexProvider>();
builder.Services.AddIndexProvider<OpenIdTokenIndexProvider>();

return builder;
}
Expand Down

0 comments on commit 49b2431

Please sign in to comment.