Method: Mechanize::HTTP::Agent#add_auth
- Defined in:
- lib/mechanize/http/agent.rb
#add_auth(uri, user, password, realm = nil, domain = nil) ⇒ Object
Adds credentials user, pass for uri. If realm is set the credentials are used only for that realm. If realm is not set the credentials become the default for any realm on that URI.
domain and realm are exclusive as NTLM does not follow RFC 2617. If domain is given it is only used for NTLM authentication.
213 214 215 |
# File 'lib/mechanize/http/agent.rb', line 213 def add_auth uri, user, password, realm = nil, domain = nil @auth_store.add_auth uri, user, password, realm, domain end |