GUACAMOLE-1293: Change handshake instruction and client to username.

This commit is contained in:
Virtually Nick
2022-04-01 19:47:35 -04:00
parent 236164c6ec
commit d0b5ffe967
4 changed files with 17 additions and 17 deletions

View File

@@ -297,10 +297,10 @@ public class ConfiguredGuacamoleSocket extends DelegatingGuacamoleSocket {
}
// Send client name, if supported and available
if (GuacamoleProtocolCapability.NAME_HANDSHAKE.isSupported(protocolVersion)) {
String name = info.getName();
if (name != null)
writer.writeInstruction(new GuacamoleInstruction("name", name));
if (GuacamoleProtocolCapability.USERNAME_HANDSHAKE.isSupported(protocolVersion)) {
String username = info.getUsername();
if (username != null)
writer.writeInstruction(new GuacamoleInstruction("username", username));
}
// Send args

View File

@@ -62,7 +62,7 @@ public class GuacamoleClientInformation {
/**
* The name of the user reported by the client.
*/
private String name;
private String username;
/**
* The timezone reported by the client.
@@ -162,8 +162,8 @@ public class GuacamoleClientInformation {
* @return
* A string value of the human-readable name reported by the client.
*/
public String getName() {
return name;
public String getUsername() {
return username;
}
/**
@@ -181,11 +181,11 @@ public class GuacamoleClientInformation {
/**
* Set the human-readable name of the user associated with this client.
*
* @param name
* @param username
* The human-readable name of the user associated with this client.
*/
public void setName(String name) {
this.name = name;
public void setUsername(String username) {
this.username = username;
}
/**

View File

@@ -41,12 +41,12 @@ public enum GuacamoleProtocolCapability {
MSG_INSTRUCTION(GuacamoleProtocolVersion.VERSION_1_5_0),
/**
* Support for the "name" handshake instruction, allowing clients to send
* the name of the Guacamole user to be passed to guacd and associated with
* connections. Support for this insruction was introduced in
* Support for the "username" handshake instruction, allowing clients to
* send the name of the Guacamole user to be passed to guacd and associated
* with connections. Support for this instruction was introduced in
* {@link GuacamoleProtocolVersion#VERSION_1_5_0}.
*/
NAME_HANDSHAKE(GuacamoleProtocolVersion.VERSION_1_5_0),
USERNAME_HANDSHAKE(GuacamoleProtocolVersion.VERSION_1_5_0),
/**
* Negotiation of Guacamole protocol version between client and server