Skip to content

Commit 94eb611

Browse files
kevmooCommit Queue
authored andcommitted
[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 <[email protected]> Commit-Queue: Brian Quinlan <[email protected]> Auto-Submit: Kevin Moore <[email protected]>
1 parent 2d80285 commit 94eb611

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

sdk/lib/_http/http.dart

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import 'dart:_internal'
1010
Since,
1111
valueOfNonNullableParamWithDefault,
1212
HttpStatus;
13-
import 'dart:async';
1413
import 'dart:async' as dart_async show runZoned;
14+
import 'dart:async';
1515
import '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].
20482052
abstract interface class HttpClientCredentials {}
20492053

20502054
/// Represents credentials for basic authentication.
2055+
///
2056+
/// See https://datatracker.ietf.org/doc/html/rfc7617
20512057
abstract 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
20582066
abstract 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
20682078
abstract final class HttpClientDigestCredentials
20692079
implements HttpClientCredentials {
20702080
factory HttpClientDigestCredentials(String username, String password) =>

0 commit comments

Comments
 (0)