Node.js NTLM HTTP Authentication, how to handle the 3 types

后端 未结 4 559
遥遥无期
遥遥无期 2021-01-12 18:39

I\'m trying to get NTLM Authentication working w/ Node.js. I\'ve been reading this ( http://davenport.sourceforge.net/ntlm.html#theNtlmMessageHeaderLayout ). I send the head

相关标签:
4条回答
  • 2021-01-12 18:48

    Have a look at http://www.innovation.ch/personal/ronald/ntlm.html What you receive is a Type-2 Message. The pages explains it in a very practical way. You have to extract the server challenge (nonce) and the server flags.

    I just implemented a module for node.js to do just that: https://github.com/SamDecrock/node-http-ntlm

    0 讨论(0)
  • 2021-01-12 18:53

    Sam posted the best resource I've seen for understanding what's going on.

    jclulow on GitHub seems to have implemented it in a Samba library he built.

    Take a look here: https://github.com/jclulow/node-smbhash under lib\ntlm.js you can see how he's handled the responses.

    0 讨论(0)
  • 2021-01-12 18:55

    Have you looked at NTLMAPS?

    You may be able to solve your problem by using it as a proxy server, but if you really want to implement NTLM auth in Javascript, then NTLMAPS provides lots of working code to study.

    0 讨论(0)
  • 2021-01-12 19:02

    I've built client a couple of months ago using javascript, ntlm.js. Maybe that can help you get along. It was based on the documentation @ innovation.ch and Microsofts own official documentation (see the references on the github page).

    0 讨论(0)
提交回复
热议问题