Eclipseプラグインを作成し、その中でorg.eclipse.jface.wizard.Wizardを拡張してウィザードを作成しました。その中で、私はjava.net.URLConnectionを使用して、次のようにサーバーで基本認証を実行しています。
String auth = new String(Base64.encodeBase64((username + ":" + password).getBytes()));
log(auth);
URL url = new URL(server);
URLConnection conn = url.openConnection();
// this fails -- can't stop the auth window when the username/password are invalid
conn.setAllowUserInteraction(false);
conn.setRequestProperty("Authorization", "Basic " + auth);
monitor.beginTask("Authenticating: ", IProgressMonitor.UNKNOWN);
InputStream in = conn.getInputStream();
ユーザー名とパスワードが有効な場合、すべてが正常に機能します。しかし、ユーザー名とパスワードが認証されない場合、Eclipseは独自の「パスワードが必要」ウィンドウをポップアップします(これは必要ありません。失敗した認証を自分で管理したいのですが)。URLConnection.setAllowUserInteractionでこれを停止できると思いましたが、効果はありません。