NTLM authentication using node.js

I need to use node.js to communicate with the server using NTLM authentication.

I used 2 modules:

I did not find documentation for the query module for ntlm, and although node -curl supports swirl options, I did not find documentation on how to specify CURLAUTH_NTLM for CURLOPT_HTTPAUTH.

I want to know how to care for an NTLM proxy. I would like to continue using the query module.

+7
source share
5 answers

Wrote a Node.js library to do HTTP NTLM Handshaking: https://github.com/SamDecrock/node-http-ntlm

It is ported from the python-ntlm library.

+5
source

Is it important to use NTLM directly in node.js code?

Instead, you can try installing some intermediate NTLM proxies that will give you the ability to use a simple HTTP proxy in node.js. There are at least two solutions for this:

  • Cntlm - written in C
  • Ntlmaps - written in Python
+1
source

If you use Express, you can use express-ntlm, which makes NTLM much less frustrating overall

https://www.npmjs.com/package/express-ntlm

+1
source

The following is a partial implementation of the NTLM server side in Node.js. This can help with client-side request development: https://gist.github.com/3049352

And here is some code that seems to be generating a message of type 1 and receiving a response of type 2. A message of type 3 has not yet been implemented and is the last step: github.com/kevinswiber/ node -ntlm-client

Below is the NTLM protocol documentation that should help you implement it: http://www.innovation.ch/personal/ronald/ntlm.html

This is the beginning.

0
source

Unfortunately, I only made more or less simplified versions of NTLM.

This is a bit more complete: https://gist.github.com/Piot/3063016

0
source

All Articles