|Re: JAAS login module in a Jar [message #636562 is a reply to message #636097]
||Mon, 01 November 2010 17:37
Originally posted by: djlynott.rockwellcollins.com|
On 10/29/2010 4:44 AM, Opfermann C wrote:
> I'm trying to activate the equinox security with a login screen in my
> RAP application.
> I already have a login module which I have to use and which is located
> in an imported JAR.
> When I export the application to a WAR file and I test it under Tomcat,
> I need to add my login module jar in the lib folder of Tomcat which is
> very strange because I already have it imported in my plugin.
> When I test it in Eclipse by lauching the RAP application, I can't get
> it work because I get a classnotfound exception on my login module class
> (which is imported as jar in my plugin).
> Has somebody already found a solution on how the login module jar can be
> used in a plugin ?
I'm not entirely sure how your project is composed, but I ended up
having to create my login modules as fragments for the classloader
within the primary authentication plugin to resolve the classes.
Although I'm simplifying things a bit, I essentially had the following:
- authorization bundle/plug-in that performed the JAAS
- login module strategies composed as fragments to reduce coupling,
allow equinox bind them to the parent plug-in if available in the
install and be visible to the classloader of the authorization bundle
This seemed messy but it allowed me share a login dialog based on
Eclipse SWT between RAP and RCP installations. Despite working through
the classloader issues, I did eventually discover that creating a dialog
within a LoginModule would prevent interaction with the RAP application
by a given person using multiple browser instances until the login phase
succeeded. To get around this, within a RAP execution context, I present
the dialog then pass the credentials along to JAAS vs. have JAAS open
the dialog internally.
Did that make any sense?
|Re: JAAS login module in a Jar [message #636678 is a reply to message #636609]
||Tue, 02 November 2010 08:59
Originally posted by: dave.lynott.yahoo.com|
I didn't really want to call the dialog outside of the JAAS framework.
Unfortunately, I had to under RAP since I was seeing that weird
deadlock-like issue. If you do something similar and don't have that
issue, let me know how you accomplished it.
BTW: Calling it from within JAAS under an RCP application worked fine
for me. Under RAP, it would open, I just couldn't log in from other
browser instances while the dialog was showing. I can't remember now if
it was limited to the user with the dialog showing or all users
attempting to log in. I do know I really didn't notice the problem till
I deployed it (probably because I'm in debug most of the time and not
trying to create multiple instances of the application in other browser
Powered by FUDForum
. Page generated in 0.01605 seconds