使用Flutter / dart进行NTLM身份验证 [英] NTLM Authentication using Flutter / dart
问题描述
背景故事,我正在尝试连接到使用NTLM身份验证的网站。我已经遇到了很多与此有关的问题,但是我坚持不懈,我想成功。
我正在使用Flutter,并且尝试在其中搜索任何http客户端支持NTLM / NTLM / 2身份验证的飞镖,我什么都找不到。
有没有办法实现/使用NTLM来实现/连接到网站?具体来说是一个问题,但是如果有人像我在寻找解决方案时一样偶然发现了这个问题,我就发布了 https:/ /github.com/mrbbot/ntlm 。
未经广泛测试,但似乎对我有用。
安装
将依赖项添加到 pubspec.yaml
文件:
< pre class = lang-yaml prettyprint-override>
依赖项:
ntlm:^ 1.3.0
示例用法
import'package:ntlm / ntlm.dart';
main(){
NTLMClient客户端=新NTLMClient(
域:,
工作站: LAPTOP,
用户名: User208,
密码: password,
);
client.get( https://example.com/).then((res){
print(res.body);
});
}
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.
Installing
Add the dependency to your pubspec.yaml
file:
dependencies:
ntlm: ^1.3.0
Example Usage
import 'package:ntlm/ntlm.dart';
main() {
NTLMClient client = new NTLMClient(
domain: "",
workstation: "LAPTOP",
username: "User208",
password: "password",
);
client.get("https://example.com/").then((res) {
print(res.body);
});
}
这篇关于使用Flutter / dart进行NTLM身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!