Enable WindowsIdentity for CoreCLR.
This commit is contained in:
parent
b7fb516aac
commit
a42a069dcf
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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-*",
|
||||
|
|
|
|||
Loading…
Reference in New Issue