From dc4db92d5c3763ba14ee0d53ebb7c656172582cd Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 26 Jun 2017 12:14:02 -0700 Subject: [PATCH] Remove usage of IOptionsCache (#1287) --- .../DeveloperCertificateMiddleware.cs | 5 ----- 1 file changed, 5 deletions(-) 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; };