authenticate property
void authenticate=(Sets the function to be called when a site is requesting authentication. The URL requested and the security realm from the server are passed in the arguments url
and realm
.
The function returns a Future which should complete when the authentication has been resolved. If credentials cannot be provided the Future should complete with false
. If credentials are available the function should add these using addCredentials before completing the Future with the value true
.
If the Future completes with true the request will be retried using the updated credentials. Otherwise response processing will continue normally.
Source
set authenticate(Future<bool> f(Uri url, String scheme, String realm));
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-io/HttpClient/authenticate.html