}
[ConditionalFact(nameof(Helpers) + "." + nameof(Helpers.IsWindowsImplementation))] // [PlatformSpecific(TestPlatforms.Windows, "Managed impl doesn't support NTLM")]
- [ActiveIssue(20604)]
public async Task NtlmAuthentication_Conversation_ReturnsExpectedType2Message()
{
_listener.AuthenticationSchemes = AuthenticationSchemes.Ntlm;
yield return new object[] { "abcd", HttpStatusCode.BadRequest };
}
- [ConditionalFact(nameof(Helpers) + "." + nameof(Helpers.IsWindowsImplementation))] // [PlatformSpecific(TestPlatforms.Windows, "Managed impl doesn't support NTLM")]
- [ActiveIssue(20604)]
+ [ConditionalTheory(nameof(Helpers) + "." + nameof(Helpers.IsWindowsImplementation))] // [PlatformSpecific(TestPlatforms.Windows, "Managed impl doesn't support NTLM")]
[MemberData(nameof(InvalidNtlmNegotiateAuthentication_TestData))]
public async Task NtlmAuthentication_InvalidRequestHeaders_ReturnsExpectedStatusCode(string header, HttpStatusCode statusCode)
{
}
[ConditionalFact(nameof(Helpers) + "." + nameof(Helpers.IsWindowsImplementation))] // [PlatformSpecific(TestPlatforms.Windows, "Managed impl doesn't support Negotiate")]
- [ActiveIssue(20604)]
public async Task NegotiateAuthentication_Conversation_ReturnsExpectedType2Message()
{
_listener.AuthenticationSchemes = AuthenticationSchemes.Negotiate;
}
}
- [ConditionalFact(nameof(Helpers) + "." + nameof(Helpers.IsWindowsImplementation))] // [PlatformSpecific(TestPlatforms.Windows, "Managed impl doesn't support Negotiate")]
- [ActiveIssue(20604)]
+ [ConditionalTheory(nameof(Helpers) + "." + nameof(Helpers.IsWindowsImplementation))] // [PlatformSpecific(TestPlatforms.Windows, "Managed impl doesn't support Negotiate")]
[MemberData(nameof(InvalidNtlmNegotiateAuthentication_TestData))]
public async Task NegotiateAuthentication_InvalidRequestHeaders_ReturnsExpectedStatusCode(string header, HttpStatusCode statusCode)
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Negotiate", header);
HttpResponseMessage message = await AuthenticationFailure(client, statusCode);
- Assert.Empty(message.Headers.WwwAuthenticate);
+ if (statusCode == HttpStatusCode.Unauthorized)
+ {
+ Assert.NotEmpty(message.Headers.WwwAuthenticate);
+ }
+ else
+ {
+ Assert.Empty(message.Headers.WwwAuthenticate);
+ }
}
}