Question

Can Rest Client do NTLM authentication?

I didn't see any options in the documentation for authentication types:

require 'rest_client'

resource = RestClient::Resource.new 'http://website', :auth_type => 'ntlm', :user => 'USERNAME', :password => 'PASSWORD'
results = resource.get

:auth_type => 'ntlm' doesn't work, and I couldn't find anything on the documentation or IRC room either.

Was it helpful?

Solution

The NTLM requirement really narrows down what HTTP software you can use due to it being so specific to Microsoft.

You might want to look at "NTLM Authentication for Ruby with Typhoeus and Curl", then look into using Typhoeus instead of rest-client.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top