(object sender, AuthRequiredEventArgs e)
| 197 | } |
| 198 | |
| 199 | private async Task OnAuthRequired(object sender, AuthRequiredEventArgs e) |
| 200 | { |
| 201 | string requestId = e.RequestId; |
| 202 | Uri uri = new Uri(e.Uri); |
| 203 | bool successfullyAuthenticated = false; |
| 204 | foreach (var authenticationHandler in this.authenticationHandlers) |
| 205 | { |
| 206 | if (authenticationHandler.UriMatcher!.Invoke(uri)) |
| 207 | { |
| 208 | PasswordCredentials credentials = (PasswordCredentials)authenticationHandler.Credentials!; |
| 209 | await this.session.Value.Domains.Network.ContinueWithAuth(e.RequestId, credentials.UserName, credentials.Password).ConfigureAwait(false); |
| 210 | successfullyAuthenticated = true; |
| 211 | break; |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | if (!successfullyAuthenticated) |
| 216 | { |
| 217 | await this.session.Value.Domains.Network.CancelAuth(e.RequestId).ConfigureAwait(false); |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | private async Task OnRequestPaused(object sender, RequestPausedEventArgs e) |
| 222 | { |
nothing calls this directly
no test coverage detected