0

How to get the logged username in windows from a remote server Apache/jboss.

I have deployed a war file in tomcat apache which is in host_1. I am accessing the web application from host_2. host_2 windows machine and logged in as a testuser. host_1 is a unix machine.

I want the server application to get the logged in username of windows[testuser] when i hit the request in browser. Is this possible? Do i need to do any settings in my browser? Any help is appreciated.

Shriram
  • 4,343
  • 8
  • 37
  • 64

1 Answers1

0

Essentially the internet is anonymous and there the user name is not returned as a http header.

You would need to run some javascript on the users browser to determine the username - and as it is a security risk I dont think it will work very well

I found this link

JavaScript - How to get the name of the current user

Community
  • 1
  • 1
richard
  • 2,887
  • 5
  • 26
  • 36