axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantinos Pateras" <kpate...@googlemail.com>
Subject Programmatically set encryption user in server
Date Thu, 17 May 2007 23:36:03 GMT
Hi all, I have set up Axis2 1.1.1 and Rampart 1.1 and configure it (I
followed the configuration instructions for Rampart 1.0 that are still
supported). I use UsernameToken and encryption  with a known key to
both parts but I want to set the encryption user programmatically in
server when it sends a response. This is because each user has its own
key stored in a database and is beeing retrieved in the
PasswordCallbackHandler.

Is there a way to do it like with
<encryptionUser>useReqSigCert</encryptionUser> that is used when the
incoming message is signed or can I get the calling user in
PasswordCallbackHandler when I send the response?

Another option is to pass a parameter to the constructor of the
PasswordCallbackHandler but I do not know where to instantiate the
handler in server.

I have tried the following in the PasswordCallbackHandler:

  MessageContext msgContext = MessageContext.getCurrentMessageContext();

but the msgContext is null in the response.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message