mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-340: Add support for "username" parameter type.
This commit is contained in:
@@ -43,7 +43,19 @@ public class ProtocolParameter {
|
||||
TEXT,
|
||||
|
||||
/**
|
||||
* A password parameter, whose value is sensitive and must be hidden.
|
||||
* A username parameter. This parameter type generally behaves
|
||||
* identically to arbitrary text parameters, but has semantic
|
||||
* differences. If credential pass-through is in use, the value for this
|
||||
* parameter may be automatically provided using the credentials
|
||||
* originally used by the user to authenticate.
|
||||
*/
|
||||
USERNAME,
|
||||
|
||||
/**
|
||||
* A password parameter, whose value is sensitive and must be hidden. If
|
||||
* credential pass-through is in use, the value for this parameter may
|
||||
* be automatically provided using the credentials originally used by
|
||||
* the user to authenticate.
|
||||
*/
|
||||
PASSWORD,
|
||||
|
||||
|
@@ -149,6 +149,11 @@ public class List extends RestrictedHttpServlet {
|
||||
xml.writeAttribute("type", "text");
|
||||
break;
|
||||
|
||||
// Username parameter
|
||||
case USERNAME:
|
||||
xml.writeAttribute("type", "username");
|
||||
break;
|
||||
|
||||
// Password parameter
|
||||
case PASSWORD:
|
||||
xml.writeAttribute("type", "password");
|
||||
|
@@ -57,6 +57,10 @@ public class ParamTagHandler implements TagHandler {
|
||||
else if ("numeric".equals(type))
|
||||
protocolParameter.setType(ProtocolParameter.Type.NUMERIC);
|
||||
|
||||
// Username field
|
||||
else if ("username".equals(type))
|
||||
protocolParameter.setType(ProtocolParameter.Type.USERNAME);
|
||||
|
||||
// Password field
|
||||
else if ("password".equals(type))
|
||||
protocolParameter.setType(ProtocolParameter.Type.PASSWORD);
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<param name="hostname" type="text" title="Hostname"/>
|
||||
<param name="port" type="numeric" title="Port"/>
|
||||
|
||||
<param name="username" type="text" title="Username"/>
|
||||
<param name="username" type="username" title="Username"/>
|
||||
<param name="password" type="password" title="Password"/>
|
||||
<param name="domain" type="text" title="Domain"/>
|
||||
<param name="initial-program" type="text" title="Initial program"/>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<param name="hostname" title="Hostname" type="text"/>
|
||||
<param name="port" title="Port" type="numeric"/>
|
||||
|
||||
<param name="username" title="Username" type="text"/>
|
||||
<param name="username" title="Username" type="username"/>
|
||||
<param name="password" title="Password" type="password"/>
|
||||
|
||||
<param name="font-name" title="Font name" type="text"/>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<param name="hostname" title="Hostname" type="text"/>
|
||||
<param name="port" title="Port" type="numeric"/>
|
||||
|
||||
<param name="username" title="Username" type="text"/>
|
||||
<param name="username" title="Username" type="username"/>
|
||||
<param name="password" title="Password" type="password"/>
|
||||
|
||||
<param name="password-regex"
|
||||
|
@@ -885,8 +885,9 @@ GuacAdmin.ConnectionEditor = function(connection, parameters) {
|
||||
var field;
|
||||
switch (parameter.type) {
|
||||
|
||||
// Text field
|
||||
// Text or username field
|
||||
case GuacamoleService.Protocol.Parameter.TEXT:
|
||||
case GuacamoleService.Protocol.Parameter.USERNAME:
|
||||
field = new GuacAdmin.Field.TEXT();
|
||||
break;
|
||||
|
||||
|
@@ -1284,6 +1284,11 @@ GuacamoleService.Protocol.Parameter.ENUM = 4;
|
||||
*/
|
||||
GuacamoleService.Protocol.Parameter.MULTILINE = 5;
|
||||
|
||||
/**
|
||||
* A username field.
|
||||
*/
|
||||
GuacamoleService.Protocol.Parameter.USERNAME = 6;
|
||||
|
||||
/**
|
||||
* Collection of service functions which deal with protocols. Each function
|
||||
* makes an explicit HTTP query to the server, and parses the response.
|
||||
@@ -1355,6 +1360,11 @@ GuacamoleService.Protocols = {
|
||||
parameter.type = GuacamoleService.Protocol.Parameter.TEXT;
|
||||
break;
|
||||
|
||||
// Username parameter
|
||||
case "username":
|
||||
parameter.type = GuacamoleService.Protocol.Parameter.USERNAME;
|
||||
break;
|
||||
|
||||
// Password parameter
|
||||
case "password":
|
||||
parameter.type = GuacamoleService.Protocol.Parameter.PASSWORD;
|
||||
|
Reference in New Issue
Block a user