Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » No more authentication window when using URLConnection in Eclipse Plugin
No more authentication window when using URLConnection in Eclipse Plugin [message #778974] Sat, 14 January 2012 09:21 Go to next message
Ralph Soika is currently offline Ralph SoikaFriend
Messages: 192
Registered: July 2009
Senior Member
Hi,
I have a strange behavior in Eclipse with differnt plugins like BIRT.
When a plugin is using a URLConnection to a server with a secured URL, in the past Eclipse automatically shows up a login dialog to perform Basic Authentication with the server.
This seems to be a feature from Eclipse platform implemented through the extension point org.eclipse.equinox.security.loginModule.
I know about this behavior, because I have implemented my own plugin with a custom login dialog. And if the user give me wrong user/password then the eclipse login dialog pops up automatically.
So from the view of a plugin it is sufficient to provide a code like this:

....
urlConnection = (HttpURLConnection) new URL(serviceEndpoint)
					.openConnection();
urlConnection.setRequestMethod("POST");
urlConnection.setDoOutput(true);
urlConnection.setDoInput(true);
urlConnection.setAllowUserInteraction(false);
urlConnection.connect();
.....


No special handling was necessary. If the URL returns an 401 the eclipse popup dialog appears automatically.
You can test this behavior also in the BIRT Plugin when creating a DataSet based on a XML URL. BIRT has no implementation for username/password for XML URLs.

But for some strange reasons this dialog did not longer appear in some clients. And I can not figure out the problem. It seems to be independent form the OS (tested with Wind7 and Linux) and the Eclipse version (tested with 3.6 and 3.7)

Can anybody explain me this behavior? Is there a standard implementation for the extension point "org.eclipse.equinox.security.loginModule"? And how can I check if this extension is installed.
The strange thing is, that from one day to the other the dialog is missing.

Thanks for any help

Ralph

Re: No more authentication window when using URLConnection in Eclipse Plugin [message #778979 is a reply to message #778974] Sat, 14 January 2012 09:42 Go to previous messageGo to next message
Ralph Soika is currently offline Ralph SoikaFriend
Messages: 192
Registered: July 2009
Senior Member
One reason of this behavior could be the EGit Plugin. After I have reverted a Eclipse IDE into a setup without the Egit Plugin the internal login dialog appears again.
This is very strange. Could Egit be an issue? Are there any other conflicts known?
Re: No more authentication window when using URLConnection in Eclipse Plugin [message #1220293 is a reply to message #778979] Tue, 10 December 2013 22:18 Go to previous message
Daniel Johnson is currently offline Daniel JohnsonFriend
Messages: 6
Registered: September 2010
Location: Seattle, WA
Junior Member

I had the same issue with Eclipse 3.8 with the latest eGit installed, removing eGit solved the issue.
Previous Topic:Eclipse IDE preferences survey
Next Topic:changing "eclipse projects" folder location
Goto Forum:
  


Current Time: Fri Apr 19 05:19:30 GMT 2024

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

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

Back to the top