From a42a069dcf6c61bd61dbde7be72c992be94f9676 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Mon, 20 Oct 2014 10:34:46 -0700 Subject: [PATCH] Enable WindowsIdentity for CoreCLR. --- src/Microsoft.Net.Http.Server/AuthenticationManager.cs | 4 ---- src/Microsoft.Net.Http.Server/project.json | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Microsoft.Net.Http.Server/AuthenticationManager.cs b/src/Microsoft.Net.Http.Server/AuthenticationManager.cs index 26670dfa48..9be0a01897 100644 --- a/src/Microsoft.Net.Http.Server/AuthenticationManager.cs +++ b/src/Microsoft.Net.Http.Server/AuthenticationManager.cs @@ -163,9 +163,7 @@ namespace Microsoft.Net.Http.Server && requestInfo->InfoType == UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_INFO_TYPE.HttpRequestInfoTypeAuth && requestInfo->pInfo->AuthStatus == UnsafeNclNativeMethods.HttpApi.HTTP_AUTH_STATUS.HttpAuthStatusSuccess) { -#if !ASPNETCORE50 return true; -#endif } return false; } @@ -176,10 +174,8 @@ namespace Microsoft.Net.Http.Server && requestInfo->InfoType == UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_INFO_TYPE.HttpRequestInfoTypeAuth && requestInfo->pInfo->AuthStatus == UnsafeNclNativeMethods.HttpApi.HTTP_AUTH_STATUS.HttpAuthStatusSuccess) { -#if !ASPNETCORE50 return new WindowsPrincipal(new WindowsIdentity(requestInfo->pInfo->AccessToken, GetAuthTypeFromRequest(requestInfo->pInfo->AuthType).ToString())); -#endif } return new ClaimsPrincipal(new ClaimsIdentity()); // Anonymous / !IsAuthenticated } diff --git a/src/Microsoft.Net.Http.Server/project.json b/src/Microsoft.Net.Http.Server/project.json index 01dab743c5..0b54d7ca45 100644 --- a/src/Microsoft.Net.Http.Server/project.json +++ b/src/Microsoft.Net.Http.Server/project.json @@ -33,6 +33,7 @@ "System.Security.Claims": "4.0.0-beta-*", "System.Security.Cryptography.X509Certificates": "4.0.0-beta-*", "System.Security.Principal": "4.0.0-beta-*", + "System.Security.Principal.Windows": "4.0.0-beta-*", "System.Text.Encoding": "4.0.10-beta-*", "System.Text.Encoding.Extensions": "4.0.10-beta-*", "System.Threading": "4.0.0-beta-*",