class Mechanize::HTTP::AuthStore

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