Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse proxy implementation, NTML(Smartcard credentials when authenticating via a proxy (for examples when communicating with update sites behind a company firewall))
Eclipse proxy implementation, NTML [message #891919] Tue, 26 June 2012 10:59 Go to next message
Eclipse UserFriend
Wondering how Eclipse implements proxy authentication....

Sit behind a company firewall that uses our NetId smartcard for authentication when calling the outside world via a proxy. Eclipse needs a host, port, provider equal to Manual, and Auth equals to false in my network setting to get at update sites. How is this implemented? Reason I ask is that I having trouble making NTML credentials with Apache HTTPClient and thought the Eclipse IDE likely has a Java implementation that I can learn from.

mvh / Matthew Young
Re: Eclipse proxy implementation, NTML [message #891925 is a reply to message #891919] Tue, 26 June 2012 11:23 Go to previous message
Eclipse UserFriend
Likely answering my own question. But apparently the HTTPUrlConnection class does the credential stuff automatically as long as the http.proxyHost and http.proxyPort system properties are set. Just tested:
                String url = "<destination>", proxy = "<our proxy>", port = "8080";
		URL server = new URL(url);
		Properties systemProperties = System.getProperties();
		systemProperties.setProperty("http.proxyHost", proxy);
		systemProperties.setProperty("http.proxyPort", port);
		HttpURLConnection connection = (HttpURLConnection) server.openConnection();
		connection.connect();
		BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
		String inputLine;
		while ((inputLine = in.readLine()) != null) 
		  System.out.println(inputLine);
		in.close();


Assuming Eclipse uses HTTPUrlConnection while HTTPClient doesn't.
Previous Topic:Executable Jar won't load from command line
Next Topic:how do I see compiler errors??
Goto Forum:
  


Current Time: Tue Jul 08 07:20:33 EDT 2025

Powered by FUDForum. Page generated in 0.05903 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top