mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1293: Change "username" instruction to simply "name" for clarity on its purpose.
This commit is contained in:
@@ -1857,7 +1857,7 @@ Guacamole.Client.Message = {
|
||||
/**
|
||||
* A client message that indicates that a user has joined an existing
|
||||
* connection. This message expects a single additional argument - the
|
||||
* username of the user who has joined the connection.
|
||||
* name of the user who has joined the connection.
|
||||
*
|
||||
* @type {!number}
|
||||
*/
|
||||
@@ -1866,7 +1866,7 @@ Guacamole.Client.Message = {
|
||||
/**
|
||||
* A client message that indicates that a user has left an existing
|
||||
* connection. This message expects a single additional argument - the
|
||||
* username of the user who has left the connection.
|
||||
* name of the user who has left the connection.
|
||||
*
|
||||
* @type {!number}
|
||||
*/
|
||||
|
@@ -297,10 +297,10 @@ public class ConfiguredGuacamoleSocket extends DelegatingGuacamoleSocket {
|
||||
}
|
||||
|
||||
// Send client name, if supported and available
|
||||
if (GuacamoleProtocolCapability.USERNAME_HANDSHAKE.isSupported(protocolVersion)) {
|
||||
String username = info.getUsername();
|
||||
if (username != null)
|
||||
writer.writeInstruction(new GuacamoleInstruction("username", username));
|
||||
if (GuacamoleProtocolCapability.NAME_HANDSHAKE.isSupported(protocolVersion)) {
|
||||
String name = info.getName();
|
||||
if (name != null)
|
||||
writer.writeInstruction(new GuacamoleInstruction("name", name));
|
||||
}
|
||||
|
||||
// Send args
|
||||
|
@@ -62,7 +62,7 @@ public class GuacamoleClientInformation {
|
||||
/**
|
||||
* The name of the user reported by the client.
|
||||
*/
|
||||
private String username;
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 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 getUsername() {
|
||||
return username;
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,11 +181,11 @@ public class GuacamoleClientInformation {
|
||||
/**
|
||||
* Set the human-readable name of the user associated with this client.
|
||||
*
|
||||
* @param username
|
||||
* @param name
|
||||
* The human-readable name of the user associated with this client.
|
||||
*/
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -41,12 +41,12 @@ public enum GuacamoleProtocolCapability {
|
||||
MSG_INSTRUCTION(GuacamoleProtocolVersion.VERSION_1_5_0),
|
||||
|
||||
/**
|
||||
* 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
|
||||
* 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 instruction was introduced in
|
||||
* {@link GuacamoleProtocolVersion#VERSION_1_5_0}.
|
||||
*/
|
||||
USERNAME_HANDSHAKE(GuacamoleProtocolVersion.VERSION_1_5_0),
|
||||
NAME_HANDSHAKE(GuacamoleProtocolVersion.VERSION_1_5_0),
|
||||
|
||||
/**
|
||||
* Negotiation of Guacamole protocol version between client and server
|
||||
|
@@ -56,8 +56,8 @@ public class GuacamoleProtocolVersion {
|
||||
/**
|
||||
* Protocol version 1.5.0, which introduces the "msg" instruction, allowing
|
||||
* the server to send message notifications that will be displayed on the
|
||||
* client. The version also adds support for the "username" handshake
|
||||
* instruction, allowing guacd to store the username of the user who is
|
||||
* client. The version also adds support for the "name" handshake
|
||||
* instruction, allowing guacd to store the name of the user who is
|
||||
* accessing the connection.
|
||||
*/
|
||||
public static final GuacamoleProtocolVersion VERSION_1_5_0 = new GuacamoleProtocolVersion(1, 5, 0);
|
||||
|
@@ -341,10 +341,10 @@ public class TunnelRequestService {
|
||||
AuthenticatedUser authenticatedUser = session.getAuthenticatedUser();
|
||||
UserContext userContext = session.getUserContext(authProviderIdentifier);
|
||||
|
||||
// Attempt to get the username and set it for the tunnel client.
|
||||
String username = authenticatedUser.getCredentials().getUsername();
|
||||
if (username != null)
|
||||
info.setUsername(username);
|
||||
// Attempt to get the user's name and set it for the tunnel client.
|
||||
String name = authenticatedUser.getIdentifier();
|
||||
if (name != null)
|
||||
info.setName(name);
|
||||
|
||||
try {
|
||||
|
||||
|
Reference in New Issue
Block a user