-
Jan 22nd, 2009, 06:20 AM
#1
get username and password on server side using basic authentication
Hello,
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.
Thanks,
Fermo
-
Jan 23rd, 2009, 05:03 AM
#2
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:
http://static.springframework.org/sp...l/preauth.html
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules