GUAC-340: Add support for "username" parameter type.

This commit is contained in:
Michael Jumper
2014-11-23 12:57:19 -08:00
parent 02189e3d7c
commit 534f4f45c1
8 changed files with 37 additions and 5 deletions

View File

@@ -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,

View File

@@ -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");

View File

@@ -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);