my question may be weird for people coming from the web side.
However, I develop a GWT application inside a company. The users have
to be authenticated to access the facilities. To do that, I could have
created a login page, with "yet an other password". But I dont want
the user log into its unix session or windows session, and again in
the web Application.
The session I want to use is based on the login of the current user:
either the NT account either the unix one.
So, is it possible to get the current windows or unix login with GWT
(as in java, you have the java.user.name property). I did not find
anything about it.
thank's
package com.tuesdaymorning.datawarehouse.server;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
public class RPCsuperImpl extends RemoteServiceServlet {
private static final long serialVersionUID = 200611201219L;
protected String domain = "TM\\";
public String getUserName() {
String user = getThreadLocalRequest().getRemoteUser();
if (user == null) {
return "default";
}
if (!user.toLowerCase().startsWith(domain.toLowerCase())) {
user = domain + user;
}
return user;
}
}