Method: Mechanize::HTTP::AuthStore#remove_auth

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

#remove_auth(uri, realm = nil) ⇒ Object

Removes credentials for realm on the server at uri. If realm is not set all credentials for the server at uri are removed.

[View source]

109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/mechanize/http/auth_store.rb', line 109

def remove_auth uri, realm = nil
  uri = URI uri unless URI === uri

  uri += '/'

  if realm then
    auth_accounts[uri].delete realm
  else
    auth_accounts.delete uri
  end

  self
end