Path: | lib/mechanize/http/auth_store.rb |
Last Update: | Tue Apr 09 07:28:03 +0000 2013 |
A credential store for HTTP authentication.
uri = URI 'http://example' store = Mechanize::HTTP::AuthStore.new store.add_auth uri, 'user1', 'pass' store.add_auth uri, 'user2', 'pass', 'realm' user, pass = store.credentials_for uri, 'realm' #=> 'user2', 'pass' user, pass = store.credentials_for uri, 'other' #=> 'user1', 'pass' store.remove_auth uri # removes all credentials