Removed default memory cache provider
This commit is contained in:
@@ -28,9 +28,11 @@ public static class HopFrameAuthenticationExtensions {
|
|||||||
service.AddScoped(typeof(ICacheProvider), config.CacheProvider);
|
service.AddScoped(typeof(ICacheProvider), config.CacheProvider);
|
||||||
service.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
service.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||||
service.AddScoped<ITokenContext, TokenContextImplementor>();
|
service.AddScoped<ITokenContext, TokenContextImplementor>();
|
||||||
|
|
||||||
|
if (config.CacheProvider == typeof(MemoryCacheProvider))
|
||||||
|
service.AddMemoryCache();
|
||||||
|
|
||||||
service.AddHttpClient();
|
service.AddHttpClient<OpenIdAccessor>();
|
||||||
service.AddMemoryCache();
|
|
||||||
service.AddScoped<IOpenIdAccessor, OpenIdAccessor>();
|
service.AddScoped<IOpenIdAccessor, OpenIdAccessor>();
|
||||||
|
|
||||||
service.AddOptionsFromConfiguration<HopFrameAuthenticationOptions>(configuration);
|
service.AddOptionsFromConfiguration<HopFrameAuthenticationOptions>(configuration);
|
||||||
|
|||||||
Reference in New Issue
Block a user