Ruby NTLM Library [closed]
Anyone have a good NTLM library recommend for Ruby?
There is http://rubyforge.org/projects/rubyntlm/ but it has not been touched in quite a while.
Update: I forgot to point out that I am looking for a client library. The service I want to use sits behind NTLM.
Depending on your use maybe rack-ntlm could be useful.
I use NTLM for login at the intranet at work but I ended up going with setting up Apache with winbind. I used this guide for the rails intregration.
I used these guides for configuration winbind, http://wiki.squid-cache.org/ConfigExamples/Authenticate/WindowsActiveDirectory and http://adldap.sourceforge.net/wiki/doku.php?id=mod_auth_ntlm_winbind.
Try this gem https://rubygems.org/gems/httpi-ntlm
gem install httpi-ntlm
It worked well for us with SharePoint 2007 and 2010 over NTLM.
require 'httpi-ntlm'
request = HTTPI::Request.new("http://example-ntlm-url")
request.auth.ntlm("username", "password")
response = HTTPI.get request
puts response.body
Make sure the [httpi][1]
gem is not loaded prior to loading httpi-ntlm. Otherwise, the HTTPI class from httpi gem gets loaded and the auth.ntlm
method will not be found.
精彩评论