Method: Net::HTTPHeader#ntlm_auth
- Defined in:
- lib/www/ntlm-http/lib/net/ntlm_http.rb
#ntlm_auth(user, password, wait = false) ⇒ Object
can set wait - don’t authenticate unless challenged. useful when reusing the connection (otherwise you handshake for each request). wait should probably become the default, allowing the type of authentication to be driven by a server challenge.
793 794 795 796 |
# File 'lib/www/ntlm-http/lib/net/ntlm_http.rb', line 793 def ntlm_auth user, password, wait=false @auth_data = [:ntlm, user, password] self['Authorization'] = 'NTLM ' + Net::NTLM::Message::Type1.new.encode64 unless wait end |