File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Security and the fly likes Using JAAS with different WebApp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "Using JAAS with different WebApp" Watch "Using JAAS with different WebApp" New topic

Using JAAS with different WebApp

Felix Ng

Joined: Jan 04, 2006
Posts: 9

My app already support JAAS

Now, I want to have my app sitting with another application (Liferay Portal). I know they are using JAAS too, and from now on, people with Auth. against their database.

My question is: How can my application detect which user had logged in? Is there anything to do with JAAS actually...
Jason Moors
Ranch Hand

Joined: Dec 04, 2001
Posts: 188
What do you mean by 'My App' do you mean a Web Application i.e. an application with a web.xml? As Liferay is a Portal application which implements the JSR-168 Portlet specification so to put your application within Liferay your would need to convert your application to run as a Portlet.

The Portlet spec defined a PortletRequest object which has getUserPrincipal() method which can used to retrieve the JAAS Princple.


Felix Ng

Joined: Jan 04, 2006
Posts: 9

Thanks, this is very helpful :>
I agree. Here's the link:
subject: Using JAAS with different WebApp
It's not a secret anymore!