From 94eb611a9a40849eaca821635d15c79dab1d4341 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 3 Apr 2025 08:18:59 -0700 Subject: [PATCH] [io] Update doc comments for HttpClientCredentials Test=docs only change Change-Id: I51527c82f4ee3204897db64e5d24ee164212d553 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419987 Reviewed-by: Brian Quinlan Commit-Queue: Brian Quinlan Auto-Submit: Kevin Moore --- sdk/lib/_http/http.dart | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/sdk/lib/_http/http.dart b/sdk/lib/_http/http.dart index 5e980599490..7a616a6845c 100644 --- a/sdk/lib/_http/http.dart +++ b/sdk/lib/_http/http.dart @@ -10,8 +10,8 @@ import 'dart:_internal' Since, valueOfNonNullableParamWithDefault, HttpStatus; -import 'dart:async'; import 'dart:async' as dart_async show runZoned; +import 'dart:async'; import 'dart:collection' show HashMap, @@ -2045,9 +2045,15 @@ enum HttpClientResponseCompressionState { compressed, } +/// Represents credentials for authentication in [HttpClient]. +/// +/// Subtypes of [HttpClientCredentials] can be passed to +/// [HttpClient.addCredentials] or [HttpClient.addProxyCredentials]. abstract interface class HttpClientCredentials {} /// Represents credentials for basic authentication. +/// +/// See https://datatracker.ietf.org/doc/html/rfc7617 abstract final class HttpClientBasicCredentials implements HttpClientCredentials { factory HttpClientBasicCredentials(String username, String password) => @@ -2055,16 +2061,20 @@ abstract final class HttpClientBasicCredentials } /// Represents credentials for bearer token authentication. +/// +/// See https://datatracker.ietf.org/doc/html/rfc6750 abstract final class HttpClientBearerCredentials implements HttpClientCredentials { factory HttpClientBearerCredentials(String token) => _HttpClientBearerCredentials(token); } -/// Represents credentials for digest authentication. Digest -/// authentication is only supported for servers using the MD5 -/// algorithm and quality of protection (qop) of either "none" or -/// "auth". +/// Represents credentials for digest authentication. +/// +/// Digest authentication is only supported for servers using the MD5 algorithm +/// and quality of protection (qop) of either "none" or "auth". +/// +/// See https://datatracker.ietf.org/doc/html/rfc7616 abstract final class HttpClientDigestCredentials implements HttpClientCredentials { factory HttpClientDigestCredentials(String username, String password) =>