Commit 847744ec authored by helene ortiz's avatar helene ortiz
Browse files

remove password from login methods + use last YLG's method to login

parent 75eaf520
...@@ -42,9 +42,9 @@ public class LoginManager { ...@@ -42,9 +42,9 @@ public class LoginManager {
public class ConnectionFailure extends Exception {}; public class ConnectionFailure extends Exception {};
public void login(String login, String password, boolean standalone, String serverId) throws LoginIncorrectException, ClientAlreadyLaunchedException, ConnectionFailure { public void login(String login, boolean standalone, String serverId) throws LoginIncorrectException, ClientAlreadyLaunchedException, ConnectionFailure {
try { try {
ServerSessionManager.getInstance(serverId).login(standalone); ServerSessionManager.getInstance(serverId).login(standalone, login);
} catch (SessionManager.ClientAlreadyLaunchedException e) { } catch (SessionManager.ClientAlreadyLaunchedException e) {
throw new ClientAlreadyLaunchedException(); throw new ClientAlreadyLaunchedException();
} catch (ServerSessionManager.ConnectionFailure e) { } catch (ServerSessionManager.ConnectionFailure e) {
......
...@@ -82,12 +82,12 @@ public class ServerSessionManager { ...@@ -82,12 +82,12 @@ public class ServerSessionManager {
return instances.get(serverId); return instances.get(serverId);
} }
public void login(boolean standAlone) throws SessionManager.ClientAlreadyLaunchedException, ConnectionFailure, LoadFailure { public void login(boolean standAlone, String user) throws SessionManager.ClientAlreadyLaunchedException, ConnectionFailure, LoadFailure {
init(); init();
try { try {
SessionManager.getInstance(serverId).login(standAlone); SessionManager.getInstance(serverId).login(standAlone, user);
} }
catch (ClientAlreadyLaunchedException e) { catch (ClientAlreadyLaunchedException e) {
// Only rethrow the exception. The call to logoutAll is made in the main application. // Only rethrow the exception. The call to logoutAll is made in the main application.
......
...@@ -104,6 +104,7 @@ public class ConfigManager { ...@@ -104,6 +104,7 @@ public class ConfigManager {
public static final String CLIENT_TYPE_PROPERTY = "clientType"; public static final String CLIENT_TYPE_PROPERTY = "clientType";
public final static String FCU_EXTENSION = ".txt"; public final static String FCU_EXTENSION = ".txt";
public static final String MAIN_USER = "main";
private Set<String> instrumentsAllowingPALFiles; private Set<String> instrumentsAllowingPALFiles;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment