cancel
Showing results for 
Search instead for 
Did you mean: 

Web Services: How to get the username token?

Former Member
0 Kudos

Hello everybody,

I wrote an EJB, Exposed it as a web service.

I'm using encryption+username as the inbound policy.

The client is adding a username token to the message.

I understood that the userpassword are checked automatically and I don't need to implement that myself but I need the userpassword from this token for another reason.

How can I get this information in the EJB's code?

Thanks, Adi.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can get the user from Session Bean's context.

myContext.getCallerPrincipal();

I think you cannot get the password. That way, it would be easy to disguise your WS as another one you could want to crack.

Regards.