You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by Bai Shen <ba...@gmail.com> on 2008/10/22 18:03:03 UTC

Programmatically assigning user name when using UsernameToken

The axis2.xml file contains a user name.  But I don't want to have to change
the xml file every time I want to change users.  I found that you can set
the user name in the PWCallbackHandler, but is there a better way to do it?
It just seems wrong to set it in the PWCallbackHandler.

Re: Programmatically assigning user name when using UsernameToken

Posted by Bai Shen <ba...@gmail.com>.
>
> Hi,
>  In the client side, you can set it using the client's options [1]. Why do
> you see it is wrong to use a password callback [2] for this.
>

I'll give the client options thing a try.  Although it seems weird to set
the username and password there.  Does that mean you can configure it
without a password callback?  Also if I use the client option, does that
mean I don't have to provide a user section in the xml file?

I don't like the password callback method because it's meant to retrieve a
password for a username, but change the username.  Seems like a bad practice
to me.

Bai Shen

Re: Programmatically assigning user name when using UsernameToken

Posted by Nandana Mihindukulasooriya <na...@gmail.com>.
Hi,
  In the client side, you can set it using the client's options [1]. Why do
you see it is wrong to use a password callback [2] for this.

thanks,
nandana

[1]  -
http://wso2.org/library/3190#Step_3._Engaging_Rampart_and_setting_authentication_information
[2] - http://wso2.org/library/3733

On Wed, Oct 22, 2008 at 10:03 PM, Bai Shen <ba...@gmail.com> wrote:

> The axis2.xml file contains a user name.  But I don't want to have to
> change
> the xml file every time I want to change users.  I found that you can set
> the user name in the PWCallbackHandler, but is there a better way to do it?
> It just seems wrong to set it in the PWCallbackHandler.
>