I need to use node.js to communicate with a server using NTLM proxy authentication.
I have used 2 modules:
1) node-curl https://github.com/jiangmiao/node-curl 2) request, coming highly recommended htps://github.com/mikeal/request
I found no documentation for the request module for ntlm , and though node-curl supports the curl easy options , I found no documentation about how to specify the CURLAUTH_NTLM for the CURLOPT_HTTPAUTH.
I want to know how to take care of the NTLM proxy authentication. I would love to continue using the request module.
Is it important for you to use NTLM directly in node.js code?
Instead you can try to install some intermediate NTLM proxies that will give you a chance to use simple HTTP proxy in node.js. There are at least two solutions for it:
Wrote a Node.js library to do the HTTP NTLM Handshaking: https://github.com/SamDecrock/node-http-ntlm
It's ported from the python-ntlm library.
Here is a partial implementation of the server side of NTLM in Node.js. It may help with developing a client side request: https://gist.github.com/3049352
And here is some code which appears to generate the type 1 message and recieve the type 2 response. The type 3 message is not yet implemented and is the final step: github.com/kevinswiber/node-ntlm-client
Here is some documentation on the NTLM protocol that should help complete it: http://www.innovation.ch/personal/ronald/ntlm.html
It's a start.
Unfortunately I've only made more or less simplistic versions of NTLM.
This is a bit more complete: https://gist.github.com/Piot/3063016