0

How can i get the windows username of a visitor that comes to my page. My page is coded in Java and runs in Intranet. I know it easy to do this with aspx (with activex i think) but how can i do this with Java.

In some topics i found some thing like this.

How to get Windows username in Java?

Get login username in java

But these are not a solution for me because;

System.getProperty("user.name");

System.getenv("USERNAME");

gives the user name of the server which the program runs on.But i need the visitors user name.

Is there a way to do this?

Community
  • 1
  • 1
Gaslan
  • 808
  • 1
  • 20
  • 27

1 Answers1

2

In a stable, corporate environment it is often posible to make a small "login & authentucation service" within ERP (C#), accessed via REST/JSON or SOAP with Java code. I did this a few times.

As a consequence, every successfully logged worker is a Java proxy to the primary login from the main system.

  • Big benefit: not to build hard security mechanism. Password are never copied in Java database.

  • Some problems: A user may have been the author of some content in Intranet. Now they are no longer part of the company, their primary login is destroyed, intranet should have very light "shadow" of dead soul.

Getting windows login is tricky. In many companies it is allowed to use browser from computer of coworker, with login to specyfic www application.

Edd
  • 1,350
  • 11
  • 14
Jacek Cz
  • 1,872
  • 1
  • 15
  • 22