NTLM authentication with Ruby and Faraday

17-Nov-2021 1287
The example how to authenticate in NTLM by curl and Faraday ruby library. Tagged with ruby, microsoft, authentication.Everyone knows how HTTP basic authentication works. A lot of services use it often. Once I happened upon with NTLM auth. Getting access was challenging, but I coped with it. After working on the task I would like to share the solution how to work with NTLM and Faraday library.For instance, with curl you can specify the user name and password for server authentication. The command looks like this: curl -u : https://resource_with_ntlm_auth.com/path_to_resource.xml -I. Unfortunately it doesn't work with NTLM. The response would be:.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle