Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top