开发者

Ruby NTLM Library [closed]

As it currently stands, this question is not a good fit for our Q&a开发者_Go百科mp;A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜