erlandranvinge / ntlm.js

Implementation of Microsoft NTLM in javascript. Allows you to do that NTLM ajax you've always wanted.
MIT License
51 stars 38 forks source link

This code doesn't connect to a Exchange Web Services (EWS) application #6

Open clenkiu opened 7 years ago

clenkiu commented 7 years ago

I'm trying to use this code to authenticate to a EWS server, but unfortunatelly it doesn't work. The NEGOTIATE message (message1) doesn't get a challenge from the server unless I change the NEGOTIATE flag to 0x00088207. From my understanding the 0x0008 performs a a NTLMv2 requests.

With these change, the server sends back the CHALLENGE message, but the AUTHENTICATE message the code sends to the server isn't authorized. The code keeps receiving 401 Unauthorized response.

I see in the spec that the AUTHENTICATE message is different for NTLMv2. This would explain the reason for not get authenticated in the server.

Could you tell me how to be sure if the exchanged messages are v1 or v2? Do you have any experience with such scenario? NTLM v2? Do you think your project could be adapted to support NTLM v2 authentication?

Thanks in advance for your help. Cleiton