v1.0.5
http_auth
Dart http middleware for HTTP Basic and Digest authentication
38Likes 10.2K30-day downloads160Pub points
AndroidiOSWebmacOSWindowsLinux
A Dart http middleware for HTTP authentication (Basic/Digest)
English project snapshot. Visit GitHub for the latest content.
An http middleware for HTTP authentication (Basic/Digest).
The method (Basic or Digest) can optionally be autodetected.
HTTP Basic authentication:
import 'package:http_auth/http_auth.dart';
main() async {
var client = http_auth.BasicAuthClient('user', 'passwd');
var response = client.get('http://httpbin.org/basic-auth/user/passwd');
}
HTTP Digest authentication:
import 'package:http_auth/http_auth.dart';
main() async {
var client = http_auth.DigestAuthClient('user', 'passwd');
var response = client.get('http://httpbin.org/digest-auth/auth/user/passwd');
}
Automatic detection of the protocol (Basic or Digest):
import 'package:http_auth/http_auth.dart';
main() async {
var client = http_auth.NegotiateAuthClient('user', 'passwd');
var response = client.get('http://httpbin.org/digest-auth/auth/user/passwd');
}
Synchronous usage is also possible (see the example).
Start with your use case, compare repository activity, and check the original project before adopting it.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗