Method: Mechanize::HTTP::Agent#add_default_auth

Defined in:
lib/mechanize/http/agent.rb

#add_default_auth(user, password, domain = nil) ⇒ Object

USE OF add_default_auth IS NOT RECOMMENDED AS IT MAY EXPOSE PASSWORDS TO THIRD PARTIES

Adds credentials user, pass as the default authentication credentials. If no other credentials are available these will be returned from credentials_for.

If domain is given it is only used for NTLM authentication.



227
228
229
# File 'lib/mechanize/http/agent.rb', line 227

def add_default_auth user, password, domain = nil # :nodoc:
  @auth_store.add_default_auth user, password, domain
end