Hi Massimiliano,
           As this is a possible situation, I think it is reasonable to add
an optional
parameter to specify alias for certificate to sign when it is different from
the
user name of the UsernameToken. So I created the JIRA,

https://issues.apache.org/jira/browse/RAMPART-99

will a send a patch soon.

Regards,
Nandana


On 10/22/07, Massimiliano Masi <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Quoting Massimiliano Masi <[EMAIL PROTECTED]>:
>
> > Yes. I used the same name and everything was working, but now I cannot.
> > I should sign the message with the key of the service itself, but
> > I need to authenticate another user.
> >
>
> I found the following in BindingBuilder.java:
>
>
>    protected WSSecUsernameToken addUsernameToken(RampartMessageData
> rmd) throws RampartException {
>
>          log.debug("Adding a UsernameToken");
>
>          RampartPolicyData rpd = rmd.getPolicyData();
>
>          //Get the user
>          //First try options
>          Options options = rmd.getMsgContext().getOptions();
>          String user = options.getUserName();
>          if(user == null || user.length() == 0) {
>              //Then try RampartConfig
>              if(rpd.getRampartConfig() != null) {
>                  user = rpd.getRampartConfig().getUser();
>              }
>          }
>
>
> So, it means that to achieve my result I have to put options in the
> RampartMessageData messageContext. But How can I do this?
>
> Thanks,
>
>
>          Massimiliano
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to