Skip to Content
0
Former Member
Dec 11, 2006 at 11:30 AM

Authentication from WD to a J2EE application

20 Views

Dear sdn members,

I have a question about authentication from Web Dynpro to a J2EE application.

I have developed a Web Dynpro application which is using a Stateless Session Bean. I have to logon to the Web Dynpro application in order to start the application. In my Bean I have the following code:

String username = myContext.getCallerPrincipal().getName();
IUser user = UMFactory.getUserFactory().getUserByUniqueName(username);
boolean isAuthenticated = UMFactory.getLogonAuthenticator().isAuthenticated(user);

When I debug this code, I see that the user is perfectly found and represents the person which is logon on to the Web Dynpro application. But I was very surprised to find out that the boolean isAuthenticated was FALSE.

So my question is. How do I get an authenticated user when I access a Stateless Session Bean from a Web Dynpro application?

By the way, I have the same problem when I access the bean from a servlet in the Web Module of the same Enterprise Application.

I hope that someone can help.

Kind regards,

Marinus Geuze