|No more authentication window when using URLConnection in Eclipse Plugin [message #778974]
||Sat, 14 January 2012 04:21
| Ralph Soika
Registered: July 2009
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)
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
Powered by FUDForum
. Page generated in 0.09415 seconds