How to extend the LoginDialog [message #1011836] |
Wed, 20 February 2013 10:38 |
Urs Beeli Messages: 573 Registered: October 2012 Location: Bern, Switzerland |
Senior Member |
|
|
In the thread at http://www.eclipse.org/forums/index.php/mv/msg/454525/1010781/#msg_1010781 I explored the possibilities of authenticating against LDAP.
As that is now working, I'm taking things a bit further with two motivations:
- We might like to brand the LoginDialog to show a logo or some additional text
- In our current applications, the users have the possibility to specify additional parameters (that are used when authenticating them but also later on (like overriding the default language))
I was looking into how to do that. As to passing additional input that is relevant to authentication to the server, I thought that I could tack that onto the HttpRquest's header as an additional parameter after the username and password, extracting that information in MySecurityFilter.negotiate() would be trivial. The "only" question that remained was how and where to add this information to the header.
Looking at the LoginDialog class I saw that it shouldn't be to hard to add additional elements to the dialog (both decorative like logos and text as well as interactive for additional settings).
I also saw where in InternalAuthenticator.getPasswordAuthentication I could then read these values from the LoginDialog. However, it seems that even if I were to somehow modify InternalAuthenticator, InternalEclipseAuthenticator and EclipseAuthenticator so that I could pass back additional parameters, in the end these are all called from java.net.Authenticator.requestPasswordAuthentication() which I don't see how I could modify it.
So I guess I my first question is:
- is there any way to pass additional parameters back to the server through the HttpRequest from the LoginDialog?
Even if I can't pass additional parameters, I would still like to brand the LoginDialog. And here comes my second question:
- How would I replace org.eclipse.scout.rt.ui.swt.login.internal with my own implementation?
|
|
|
Re: How to extend the LoginDialog [message #1013893 is a reply to message #1011836] |
Sun, 24 February 2013 16:24 |
|
Urs,
I think you just have to implement your own Authenticator class if you want to customize the login dialog. The Authenticator concept is not specific to Scout, so you might find information about this on Oracle's website or other resources on the Internet. The starting point in a Scout application is the class org.eclipse.scout.net.NetActivator which is usually installed at a very early stage of the client startup.
Beat
|
|
|
|
Powered by
FUDForum. Page generated in 0.04577 seconds