Jan 22nd, 2009, 06:20 AM
get username and password on server side using basic authentication
I'd like to know how can I get user details on server side web application. I use basic authentication, and the client sends azt username and password in every requests, and they are compared with the tomcat-users. It is working fine, but I'd like to get details and use them in my simple echo service. For example: Login details: usr: "username" pwd: "password", (on the client side) String response = echoService.echo("SomeWord") . And the response would be some like this: response = ""Echo: SomeWord User: username Password: passwod".
I hpe I could explain what I'd like.
Jan 23rd, 2009, 05:03 AM
If you use container-based security then request, then use request.getRemoteUser or request.getUserPrincipal and read additional info from database manually.
If you also use spring security consider pre-authentication functionality:
Tags for this Thread