@@ -45,6 +45,7 @@ public HttpClientHandler_Authentication_Test(ITestOutputHelper output) : base(ou
4545
4646 [ Theory ]
4747 [ MemberData ( nameof ( Authentication_SocketsHttpHandler_TestData ) ) ]
48+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support authentication" ) ]
4849 public async Task SocketsHttpHandler_Authentication_Succeeds ( string authenticateHeader , bool result )
4950 {
5051 await HttpClientHandler_Authentication_Succeeds ( authenticateHeader , result ) ;
@@ -106,6 +107,7 @@ public static IEnumerable<object[]> Authentication_SocketsHttpHandler_TestData()
106107
107108 [ Theory ]
108109 [ MemberData ( nameof ( Authentication_TestData ) ) ]
110+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support authentication" ) ]
109111 public async Task HttpClientHandler_Authentication_Succeeds ( string authenticateHeader , bool result )
110112 {
111113 if ( PlatformDetection . IsWindowsNanoServer )
@@ -132,6 +134,7 @@ await TestHelper.WhenAllCompletedOrAnyFailedWithTimeout(TestHelper.PassingTestTi
132134 [ InlineData ( "WWW-Authenticate: Basic realm=\" hello\" \r \n WWW-Authenticate: Basic realm=\" hello\" \r \n " ) ]
133135 [ InlineData ( "WWW-Authenticate: Digest realm=\" hello\" , nonce=\" hello\" , algorithm=MD5\r \n WWW-Authenticate: Digest realm=\" hello\" , nonce=\" hello\" , algorithm=MD5\r \n " ) ]
134136 [ InlineData ( "WWW-Authenticate: Digest realm=\" hello1\" , nonce=\" hello\" , algorithm=MD5\r \n WWW-Authenticate: Digest realm=\" hello\" , nonce=\" hello\" , algorithm=MD5\r \n " ) ]
137+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support authentication" ) ]
135138 public async Task HttpClientHandler_MultipleAuthenticateHeaders_WithSameAuth_Succeeds ( string authenticateHeader )
136139 {
137140 if ( IsWinHttpHandler )
@@ -145,6 +148,7 @@ public async Task HttpClientHandler_MultipleAuthenticateHeaders_WithSameAuth_Suc
145148 [ Theory ]
146149 [ InlineData ( "WWW-Authenticate: Basic realm=\" hello\" \r \n WWW-Authenticate: Digest realm=\" hello\" , nonce=\" hello\" , algorithm=MD5\r \n " ) ]
147150 [ InlineData ( "WWW-Authenticate: Digest realm=\" hello\" , nonce=\" hello\" , algorithm=MD5\r \n WWW-Authenticate: Basic realm=\" hello\" \r \n " ) ]
151+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support authentication" ) ]
148152 public async Task HttpClientHandler_MultipleAuthenticateHeaders_Succeeds ( string authenticateHeader )
149153 {
150154 if ( PlatformDetection . IsWindowsNanoServer )
@@ -164,6 +168,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) =>
164168 [ Theory ]
165169 [ InlineData ( "WWW-Authenticate: Basic realm=\" hello\" \r \n WWW-Authenticate: NTLM\r \n " , "Basic" , "Negotiate" ) ]
166170 [ InlineData ( "WWW-Authenticate: Basic realm=\" hello\" \r \n WWW-Authenticate: Digest realm=\" hello\" , nonce=\" hello\" , algorithm=MD5\r \n WWW-Authenticate: NTLM\r \n " , "Digest" , "Negotiate" ) ]
171+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support authentication" ) ]
167172 public async Task HttpClientHandler_MultipleAuthenticateHeaders_PicksSupported ( string authenticateHeader , string supportedAuth , string unsupportedAuth )
168173 {
169174 if ( PlatformDetection . IsWindowsNanoServer )
@@ -189,6 +194,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) =>
189194 [ Theory ]
190195 [ InlineData ( "WWW-Authenticate: Basic realm=\" hello\" \r \n " ) ]
191196 [ InlineData ( "WWW-Authenticate: Digest realm=\" hello\" , nonce=\" testnonce\" \r \n " ) ]
197+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support authentication" ) ]
192198 public async Task HttpClientHandler_IncorrectCredentials_Fails ( string authenticateHeader )
193199 {
194200 var options = new LoopbackServer . Options { Domain = Domain , Username = Username , Password = Password } ;
@@ -226,6 +232,7 @@ public static IEnumerable<object[]> Authentication_TestData()
226232 [ InlineData ( "NTLM" ) ]
227233 [ InlineData ( "Kerberos" ) ]
228234 [ InlineData ( "Negotiate" ) ]
235+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support PreAuthenticate" ) ]
229236 public async Task PreAuthenticate_NoPreviousAuthenticatedRequests_NoCredentialsSent ( string ? credCacheScheme )
230237 {
231238 const int NumRequests = 3 ;
@@ -268,6 +275,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri =>
268275 [ Theory ]
269276 [ InlineData ( null , "WWW-Authenticate: Basic realm=\" hello\" \r \n " ) ]
270277 [ InlineData ( "Basic" , "WWW-Authenticate: Basic realm=\" hello\" \r \n " ) ]
278+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support PreAuthenticate" ) ]
271279 public async Task PreAuthenticate_FirstRequestNoHeaderAndAuthenticates_SecondRequestPreauthenticates ( string ? credCacheScheme , string authResponse )
272280 {
273281 await LoopbackServer . CreateClientAndServerAsync ( async uri =>
@@ -360,6 +368,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri =>
360368 [ InlineData ( ( HttpStatusCode ) 508 ) ] // LoopDetected
361369 [ InlineData ( ( HttpStatusCode ) 510 ) ] // NotExtended
362370 [ InlineData ( ( HttpStatusCode ) 511 ) ] // NetworkAuthenticationRequired
371+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support PreAuthenticate" ) ]
363372 public async Task PreAuthenticate_FirstRequestNoHeader_SecondRequestVariousStatusCodes_ThirdRequestPreauthenticates ( HttpStatusCode statusCode )
364373 {
365374 const string AuthResponse = "WWW-Authenticate: Basic realm=\" hello\" \r \n " ;
@@ -403,6 +412,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri =>
403412 [ InlineData ( "/something/hello.html" , "/world.html" , false ) ]
404413 [ InlineData ( "/something/hello.html" , "/another/" , false ) ]
405414 [ InlineData ( "/something/hello.html" , "/another/hello.html" , false ) ]
415+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support PreAuthenticate" ) ]
406416 public async Task PreAuthenticate_AuthenticatedUrl_ThenTryDifferentUrl_SendsAuthHeaderOnlyIfPrefixMatches (
407417 string originalRelativeUri , string secondRelativeUri , bool expectedAuthHeader )
408418 {
@@ -442,6 +452,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri =>
442452 }
443453
444454 [ Fact ]
455+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support PreAuthenticate" ) ]
445456 public async Task PreAuthenticate_SuccessfulBasicButThenFails_DoesntLoopInfinitely ( )
446457 {
447458 await LoopbackServer . CreateClientAndServerAsync ( async uri =>
@@ -480,6 +491,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri =>
480491 }
481492
482493 [ Fact ]
494+ [ SkipOnPlatform ( TestPlatforms . Wasi , "WASI HttpHandler does not support PreAuthenticate" ) ]
483495 public async Task PreAuthenticate_SuccessfulBasic_ThenDigestChallenged ( )
484496 {
485497 if ( IsWinHttpHandler )
0 commit comments