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