mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
Transfer password.
This commit is contained in:
parent
33330e9345
commit
d0ea7d9c37
6 changed files with 24 additions and 14 deletions
|
|
@ -56,7 +56,7 @@ import mage.view.UserView;
|
|||
public interface MageServer {
|
||||
|
||||
// connection methods
|
||||
boolean registerClient(String userName, String sessionId, MageVersion version) throws MageException;
|
||||
boolean registerClient(String userName, String password, String sessionId, MageVersion version) throws MageException;
|
||||
|
||||
boolean registerAdmin(String password, String sessionId, MageVersion version) throws MageException;
|
||||
// Not used
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ public class Connection {
|
|||
private String host;
|
||||
private int port;
|
||||
private String username;
|
||||
private String password;
|
||||
private String adminPassword;
|
||||
private ProxyType proxyType;
|
||||
private String proxyHost;
|
||||
|
|
@ -164,6 +165,14 @@ public class Connection {
|
|||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getAdminPassword() {
|
||||
return adminPassword;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ public class SessionImpl implements Session {
|
|||
boolean registerResult;
|
||||
if (connection.getAdminPassword() == null) {
|
||||
// for backward compatibility. don't remove twice call - first one does nothing but for version checking
|
||||
registerResult = server.registerClient(connection.getUsername(), sessionId, client.getVersion());
|
||||
registerResult = server.registerClient(connection.getUsername(), connection.getPassword(), sessionId, client.getVersion());
|
||||
if (registerResult) {
|
||||
server.setUserData(connection.getUsername(), sessionId, connection.getUserData());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue