diff --git a/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/DeveloperCertificateMiddleware.cs b/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/DeveloperCertificateMiddleware.cs index 38cdb446ab..b58333a959 100644 --- a/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/DeveloperCertificateMiddleware.cs +++ b/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/DeveloperCertificateMiddleware.cs @@ -24,19 +24,16 @@ namespace Microsoft.AspNetCore.Diagnostics.Identity.Service private readonly IOptions _options; private readonly ITimeStampManager _timeStampManager; private readonly IConfiguration _configuration; - private readonly IOptionsCache _identityServiceOptionsCache; public DeveloperCertificateMiddleware( RequestDelegate next, IOptions options, - IOptionsCache identityServiceOptions, ITimeStampManager timeStampManager, IHostingEnvironment environment, IConfiguration configuration) { _next = next; _options = options; - _identityServiceOptionsCache = identityServiceOptions; _environment = environment; _timeStampManager = timeStampManager; _configuration = configuration; @@ -51,7 +48,6 @@ namespace Microsoft.AspNetCore.Diagnostics.Identity.Service await _next(context); return; } - var openIdOptionsCache = context.RequestServices.GetRequiredService>(); if (_environment.IsDevelopment() && context.Request.Path.Equals(_options.Value.ListeningEndpoint)) { @@ -107,7 +103,6 @@ namespace Microsoft.AspNetCore.Diagnostics.Identity.Service store.Open(OpenFlags.ReadWrite); store.Add(imported); store.Close(); - openIdOptionsCache.TryRemove(OpenIdConnectDefaults.AuthenticationScheme); context.Response.StatusCode = StatusCodes.Status204NoContent; };