on-internet
← Community

How to connect to HTTP Rest API that authenticates with LDAP

Stack Overflow ·

I am writing a Ruby script to connect to a REST API website. The website is authenticated by using LDAP / SSO using the AD credentials, so no basic authentication or user/password has to be provided. This is the code so far: resource_http = Net::HTTP.new(webserver.company.com, 443) resource_http.use_ssl = true resource_http.verify_mode = OpenSSL::SSL::VERIFY_NONE resource_request = Net::HTTP::Post.new("/api/endpoint") resource_request.set_form_data({"chocolate"=>"yes","beer"=>"yes"}) resource_response = resource_http.request(resource_request) But I receive an authorization error: Net::HTTPUnau

Comments

Sign in or sign up to comment and upvote.

No comments yet.