From 8d8e1ee8dc93b123ef96f2e1ba6c43d4cb41ef6f Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Wed, 12 Oct 2016 09:54:11 -0700 Subject: [PATCH] Avoid calling User.Identity.AuthenticationType (#282) --- .../AuthenticationHandler.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.IISIntegration/AuthenticationHandler.cs b/src/Microsoft.AspNetCore.Server.IISIntegration/AuthenticationHandler.cs index cdbfe921a5..a9ba20762d 100644 --- a/src/Microsoft.AspNetCore.Server.IISIntegration/AuthenticationHandler.cs +++ b/src/Microsoft.AspNetCore.Server.IISIntegration/AuthenticationHandler.cs @@ -36,9 +36,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration { if (User != null) { - context.Authenticated(User, properties: null, - description: Options.AuthenticationDescriptions.FirstOrDefault(descrip => - string.Equals(User.Identity.AuthenticationType, descrip.AuthenticationScheme, StringComparison.Ordinal))?.Items); + context.Authenticated(User, properties: null, description: null); } else { @@ -133,7 +131,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration { return true; } - + return Options.AuthenticationDescriptions.Any(description => string.Equals(description.AuthenticationScheme, authenticationScheme, StringComparison.Ordinal)); } }