360 {
363 {
366 {
368 }
370 {
373 }
374 }
377 {
379 {
381 {
384 {
385 break;
386 }
390 {
395 {
397 }
399 {
402 }
403 }
404 break;
405 }
407 {
409 {
411 {
413 }
414 break;
415 }
420 {
421 break;
422 }
424 if (
statusCode == HttpStatusCode.Unauthorized ||
statusCode == HttpStatusCode.ProxyAuthenticationRequired)
425 {
427 {
429 }
430 break;
431 }
433 {
434 try
435 {
437 {
438 System.
Net.
NetEventSource.
Info(
pool.PreAuthCredentials,
$"Adding Basic credential to cache, uri={authUri}, username={challenge.Credential.UserName}",
"SendWithAuthAsync");
439 }
441 }
442 catch (ArgumentException)
443 {
445 {
446 System.
Net.
NetEventSource.
Info(
pool.PreAuthCredentials,
$"Basic credential present in cache, uri={authUri}, username={challenge.Credential.UserName}",
"SendWithAuthAsync");
447 }
448 }
449 }
450 break;
451 }
452 }
453 }
455 {
457 }
459 }
void Add(TKey key, TValue value)
static void SetBasicAuthToken(HttpRequestMessage request, NetworkCredential credential, bool isProxyAuth)
static ValueTask< HttpResponseMessage > InnerSendAsync(HttpRequestMessage request, bool async, bool isProxyAuth, bool doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken)
static bool IsServerNonceStale(DigestResponse digestResponse)
static bool TryGetAuthenticationChallenge(HttpResponseMessage response, bool isProxyAuth, Uri authUri, ICredentials credentials, out AuthenticationChallenge challenge)
static bool TryGetRepeatedChallenge(HttpResponseMessage response, string scheme, bool isProxyAuth, out string challengeData)
static async ValueTask< bool > TrySetDigestAuthToken(HttpRequestMessage request, NetworkCredential credential, DigestResponse digestResponse, bool isProxyAuth)
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void AuthenticationError(Uri uri, string message)