lib/httpx/plugins/ntlm_authentication.rb in httpx-0.16.1 vs lib/httpx/plugins/ntlm_authentication.rb in httpx-0.17.0
- old
+ new
@@ -32,17 +32,17 @@
with(ntlm: NTLMParams.new(user, domain, password))
end
alias_method :ntlm_auth, :ntlm_authentication
- def send_requests(*requests, options)
+ def send_requests(*requests)
requests.flat_map do |request|
ntlm = request.options.ntlm
if ntlm
request.headers["authorization"] = "NTLM #{NTLM.negotiate(domain: ntlm.domain).to_base64}"
- probe_response = wrap { super(request, options).first }
+ probe_response = wrap { super(request).first }
if !probe_response.is_a?(ErrorResponse) && probe_response.status == 401 &&
probe_response.headers.key?("www-authenticate") &&
(challenge = probe_response.headers["www-authenticate"][/NTLM (.*)/, 1])
@@ -50,15 +50,15 @@
ntlm_challenge = NTLM.authenticate(challenge, ntlm.user, ntlm.domain, ntlm.password).to_base64
request.transition(:idle)
request.headers["authorization"] = "NTLM #{ntlm_challenge}"
- super(request, options)
+ super(request)
else
probe_response
end
else
- super(request, options)
+ super(request)
end
end
end
end
end