wSam wrote:
@Ananasi
Thanks for your help very much (unfortunately I cant give you no more credits, the maximum for this thread is reached).
Then I use the solution with the Listener, I think that this is better for my case (no code change to an existing web app, only via configuration).
Do you know a general way to get the logged in users password in a web app via the HttpServletRequest? (the UserPrincipal sounds right, but could it be that this data is from the web server conditioned?)
Don't worry about the credits, I think I have enough to last a while ;)
The Principal only enforces the getName() method, so that's not going to help you. No well-formed security system (sounds like you are using JAAS) would store unencrypted passwords in the HttpSession or ServletRequest. It really depends on the authentication/authorization scheme, what exactly are you using (BASIC, JAAS, homebrew, etc). You can get the logged on user's name via request.getPrincipal().getName() if the a/a scheme supports it. A few more details could help.