UEPConnection should be able to figure out if it needs basic_auth (username/password non null, cert/key null)
or not. Though if you have to flip/set user/pass/cert/key, that may not be any less code