unwire / handsoap

Handsoap is a library for creating SOAP clients in Ruby
http://github.com/unwire/handsoap
225 stars 58 forks source link

NTLM Authentication #28

Open rodrei opened 12 years ago

rodrei commented 12 years ago

I'm trying to connect to an Exchange Server that only supports NTLM authentication. I found this issue where it's recommended to install the rubyntlm gem (https://github.com/wimm/rubyntlm). I installed it and tried again and the "Wrong credentials" error was still being raised. Looking at the http drivers code it seems like it's only trying to use HTTP basic auth (unless I'm missing something, please let me know if I am).

Playing around with the rubyntlm gem I managed to authenticate successfully https://gist.github.com/2932631, but from outside the handsoap gem.

Im going to try to add ntlm support to the handsoap gem, and the best place I can think of to do it is in the http drivers, would this be the right place?

troelskn commented 12 years ago

Hi. Just saw this comment now. Yes, in the http-drivers. You could compare with how basic-auth is implemented, and just mimic that.

rodrei commented 12 years ago

It still needs a refactor but is working. Here's what I did:

https://github.com/EdisonJunior/handsoap/commit/279777aec60bb70d0a10d5dbdf35f8ea69b601a6