Announcement Announcement Module
Collapse
No announcement yet.
get username and password on server side using basic authentication Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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

    Comment

    Working...
    X