Pass in auth type for WindowsAuth in out of proc (#7074)

This commit is contained in:
BrennanConroy 2019-01-28 20:06:23 -08:00 committed by GitHub
parent 51761c3c5d
commit a8f1b034d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" /> <ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
<ProjectReference Include="..\WebSites\**\*.csproj"> <ProjectReference Include="..\testassets\**\*.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly> <ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference> </ProjectReference>
<ProjectReference Include="$(RepositoryRoot)src\Servers\IIS\IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" /> <ProjectReference Include="$(RepositoryRoot)src\Servers\IIS\IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" />

View File

@ -13,7 +13,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" /> <ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
<ProjectReference Include="..\WebSites\**\*.csproj"> <ProjectReference Include="..\testassets\**\*.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly> <ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference> </ProjectReference>
<ProjectReference Include="$(RepositoryRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" /> <ProjectReference Include="$(RepositoryRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />

View File

@ -13,7 +13,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" /> <ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
<ProjectReference Include="..\WebSites\**\*.csproj"> <ProjectReference Include="..\testassets\**\*.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly> <ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference> </ProjectReference>
<ProjectReference Include="$(RepositoryRoot)src\Servers\IIS\IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" /> <ProjectReference Include="$(RepositoryRoot)src\Servers\IIS\IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" />

View File

@ -13,7 +13,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Common.Tests\Common.Tests.csproj" /> <ProjectReference Include="..\Common.Tests\Common.Tests.csproj" />
<ProjectReference Include="..\WebSites\**\*.csproj"> <ProjectReference Include="..\testassets\**\*.csproj">
<ReferenceOutputAssembly>False</ReferenceOutputAssembly> <ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference> </ProjectReference>
<ProjectReference Include="$(RepositoryRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" /> <ProjectReference Include="$(RepositoryRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />

View File

@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
response = await httpClient.GetAsync("/Restricted"); response = await httpClient.GetAsync("/Restricted");
responseText = await response.Content.ReadAsStringAsync(); responseText = await response.Content.ReadAsStringAsync();
Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal(HttpStatusCode.OK, response.StatusCode);
Assert.NotEmpty(responseText); Assert.Equal("Windows", responseText);
} }
} }
} }

View File

@ -46,7 +46,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
{ {
// Always create the identity if the handle exists, we need to dispose it so it does not leak. // Always create the identity if the handle exists, we need to dispose it so it does not leak.
var handle = new IntPtr(hexHandle); var handle = new IntPtr(hexHandle);
var winIdentity = new WindowsIdentity(handle); var winIdentity = new WindowsIdentity(handle, IISDefaults.AuthenticationScheme);
// WindowsIdentity just duplicated the handle so we need to close the original. // WindowsIdentity just duplicated the handle so we need to close the original.
NativeMethods.CloseHandle(handle); NativeMethods.CloseHandle(handle);