@@ -85,7 +85,7 @@ public async Task InvokeAdminApi_InvalidAudience_Fails(string headerName)
8585 var response = await _fixture . Host . HttpClient . SendAsync ( request ) ;
8686 Assert . Equal ( HttpStatusCode . Unauthorized , response . StatusCode ) ;
8787
88- var validationError = _fixture . Host . GetScriptHostLogMessages ( ) . Single ( p => p . Level == LogLevel . Debug ) ;
88+ var validationError = _fixture . Host . GetScriptHostLogMessages ( ) . Single ( p => p . Category == ScriptConstants . LogCategoryHostAuthentication && p . Level == LogLevel . Debug ) ;
8989 Assert . Equal ( ScriptConstants . LogCategoryHostAuthentication , validationError . Category ) ;
9090 Assert . Equal ( "Token audience validation failed for audience 'invalid'." , validationError . FormattedMessage ) ;
9191 Assert . True ( validationError . Exception . Message . StartsWith ( "IDX10231: Audience validation failed." ) ) ;
@@ -113,7 +113,7 @@ public async Task InvokeAdminApi_InvalidIssuer_Fails(string headerName)
113113 var response = await _fixture . Host . HttpClient . SendAsync ( request ) ;
114114 Assert . Equal ( HttpStatusCode . Unauthorized , response . StatusCode ) ;
115115
116- var validationError = _fixture . Host . GetScriptHostLogMessages ( ) . Single ( p => p . Level == LogLevel . Debug ) ;
116+ var validationError = _fixture . Host . GetScriptHostLogMessages ( ) . Single ( p => p . Category == ScriptConstants . LogCategoryHostAuthentication && p . Level == LogLevel . Debug ) ;
117117 Assert . Equal ( ScriptConstants . LogCategoryHostAuthentication , validationError . Category ) ;
118118 Assert . Equal ( "Token issuer validation failed for issuer 'invalid'." , validationError . FormattedMessage ) ;
119119 Assert . Equal ( "IDX10205: Issuer validation failed." , validationError . Exception . Message ) ;
@@ -143,7 +143,7 @@ public async Task InvokeAdminApi_InvalidSignature_Fails(string headerName)
143143 var response = await _fixture . Host . HttpClient . SendAsync ( request ) ;
144144 Assert . Equal ( HttpStatusCode . Unauthorized , response . StatusCode ) ;
145145
146- var validationError = _fixture . Host . GetScriptHostLogMessages ( ) . Single ( p => p . Level == LogLevel . Debug ) ;
146+ var validationError = _fixture . Host . GetScriptHostLogMessages ( ) . Single ( p => p . Category == ScriptConstants . LogCategoryHostAuthentication && p . Level == LogLevel . Debug ) ;
147147 Assert . Equal ( ScriptConstants . LogCategoryHostAuthentication , validationError . Category ) ;
148148 Assert . Equal ( "Token validation failed." , validationError . FormattedMessage ) ;
149149 Assert . True ( validationError . Exception . Message . StartsWith ( "IDX10503: Signature validation failed." ) ) ;
0 commit comments