@@ -10,8 +10,8 @@ import 'dart:_internal'
1010 Since,
1111 valueOfNonNullableParamWithDefault,
1212 HttpStatus;
13- import 'dart:async' ;
1413import 'dart:async' as dart_async show runZoned;
14+ import 'dart:async' ;
1515import 'dart:collection'
1616 show
1717 HashMap,
@@ -2045,26 +2045,36 @@ enum HttpClientResponseCompressionState {
20452045 compressed,
20462046}
20472047
2048+ /// Represents credentials for authentication in [HttpClient] .
2049+ ///
2050+ /// Subtypes of [HttpClientCredentials] can be passed to
2051+ /// [HttpClient.addCredentials] or [HttpClient.addProxyCredentials] .
20482052abstract interface class HttpClientCredentials {}
20492053
20502054/// Represents credentials for basic authentication.
2055+ ///
2056+ /// See https://datatracker.ietf.org/doc/html/rfc7617
20512057abstract final class HttpClientBasicCredentials
20522058 implements HttpClientCredentials {
20532059 factory HttpClientBasicCredentials (String username, String password) =>
20542060 _HttpClientBasicCredentials (username, password);
20552061}
20562062
20572063/// Represents credentials for bearer token authentication.
2064+ ///
2065+ /// See https://datatracker.ietf.org/doc/html/rfc6750
20582066abstract final class HttpClientBearerCredentials
20592067 implements HttpClientCredentials {
20602068 factory HttpClientBearerCredentials (String token) =>
20612069 _HttpClientBearerCredentials (token);
20622070}
20632071
2064- /// Represents credentials for digest authentication. Digest
2065- /// authentication is only supported for servers using the MD5
2066- /// algorithm and quality of protection (qop) of either "none" or
2067- /// "auth".
2072+ /// Represents credentials for digest authentication.
2073+ ///
2074+ /// Digest authentication is only supported for servers using the MD5 algorithm
2075+ /// and quality of protection (qop) of either "none" or "auth".
2076+ ///
2077+ /// See https://datatracker.ietf.org/doc/html/rfc7616
20682078abstract final class HttpClientDigestCredentials
20692079 implements HttpClientCredentials {
20702080 factory HttpClientDigestCredentials (String username, String password) =>
0 commit comments