Backstory, I am trying to connect to a website that uses NTLM Authentication. I've been facing a lot of issues already concerning that but I am persistent and I want to succeed.
I am using Flutter and I tried searching for any http client in dart that supports NTLM / NTLM/2 authentication and I can't find anything. Is there a way to implement/ connect to a website using NTLM that works in flutter?
It's probably a bit late for this question specifically, but if anyone stumbles upon this like I did when searching for a solution, I've just released https://github.com/mrbbot/ntlm.
It's not tested extensively but it seems to be working for me.
Add the dependency to your pubspec.yaml
file:
dependencies:
ntlm: ^2.0.1
import 'package:ntlm/ntlm.dart';
main() {
var client = NTLMClient(
domain: "",
workstation: "LAPTOP",
username: "User208",
password: "password",
);
client.get(Uri.parse("https://example.com/")).then((res) {
print(res.body);
});
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With