ntlm 1.1.0 copy "ntlm: ^1.1.0" to clipboard
ntlm: ^1.1.0 copied to clipboard

outdated

Library for making HTTP requests that require NTLM authentication

NTLM #

A library for NTLM authentication in Dart/Flutter.

Installing #

Add the dependency to your pubspec.yaml file:

dependencies:
  ntlm: ^1.0.2

Example #

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);
  });
}

You can also pre-hash the password and use those results instead:

String lmPassword = lmHash("password");
String ntPassword = ntHash("password");

NTLMClient client = new NTLMClient(
  domain: "",
  workstation: "LAPTOP",
  username: "User208",
  lmPassword: lmPassword,
  ntPassword: ntPassword,
);

Flutter Web Support #

For cross-origin requests, make sure your server includes the following header in responses:

Access-Control-Expose-Headers: WWW-Authenticate

This allows the package to view NTLM messages sent by the server.

Acknowledgements #

Created from templates made available by Stagehand under a BSD-style license.

The DES code is a port of Bouncy Castle's DES Engine.

Most of the NTLM response creation code is a port of SamDecrock/node-http-ntlm which itself is a port of mullender/python-ntlm.

Password hashing functions for the type 3 message are ports of the Java code on this page.

7
likes
0
pub points
80%
popularity

Publisher

verified publishermrbbot.dev

Library for making HTTP requests that require NTLM authentication

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

fixnum, http, pointycastle, utf

More

Packages that depend on ntlm