Avoid calling User.Identity.AuthenticationType (#282)

This commit is contained in:
Pavel Krymets 2016-10-12 09:54:11 -07:00 committed by GitHub
parent f1c53378c3
commit 8d8e1ee8dc
1 changed files with 2 additions and 4 deletions

View File

@ -36,9 +36,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
{ {
if (User != null) if (User != null)
{ {
context.Authenticated(User, properties: null, context.Authenticated(User, properties: null, description: null);
description: Options.AuthenticationDescriptions.FirstOrDefault(descrip =>
string.Equals(User.Identity.AuthenticationType, descrip.AuthenticationScheme, StringComparison.Ordinal))?.Items);
} }
else else
{ {
@ -133,7 +131,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
{ {
return true; return true;
} }
return Options.AuthenticationDescriptions.Any(description => string.Equals(description.AuthenticationScheme, authenticationScheme, StringComparison.Ordinal)); return Options.AuthenticationDescriptions.Any(description => string.Equals(description.AuthenticationScheme, authenticationScheme, StringComparison.Ordinal));
} }
} }