users@glassfish.java.net

Re: propagate the user identity when calling a web service inside a servlet

From: Sarah kho <sarah.kho_at_gmail.com>
Date: Mon, 5 Apr 2010 13:57:02 +0430

hi,
I want to use user name/password authentication with the same realm that the
web application is authenticating using it.


for example:
1- bob login using his username and password into the web application
2- bob access the www.aaa.com/update/ servlet, the servlet calls a web
service in the ejb part of the same ear file using dispatch method.
3- does bob's identity will be send to ejb or i should do something
manually?

thank you.


On Mon, Apr 5, 2010 at 1:22 PM, Kumar Jayanti <Vbkumar.Jayanti_at_sun.com>wrote:

> Sarah kho wrote:
>
> Hi,
>
> i have a web service which is based on an ejb. in the same ear file i
> have a web application with a servlet which should invoke the ejb web
> service.
> my questions are:
>
> - how to enable authentication for the ejb based web service?
>
> what kind of authentication do you wish to use for the EJB WebService ?.
>
> - if i authenticate a user using FORM authentication and then invoke a
> web service from inside a servlet, will servlet send the current user
> identity to EJB or i should tweak it manually?
>
> yes it should.
>
>
>
> thanks.
>
>
>