GUAC-1176: Define USERNAME and PASSWORD fields publicly. They aren't very helpful isolated within the USERNAME_PASSWORD object.

This commit is contained in:
Michael Jumper
2015-05-27 13:22:39 -07:00
parent 10aea5d0a3
commit e51363f9c5

View File

@@ -67,13 +67,25 @@ public class CredentialsInfo {
*/ */
public static final CredentialsInfo EMPTY = new CredentialsInfo(Collections.<Field>emptyList()); public static final CredentialsInfo EMPTY = new CredentialsInfo(Collections.<Field>emptyList());
/**
* A field describing the username HTTP parameter expected by Guacamole
* during login, if usernames are being used.
*/
public static final Field USERNAME = new Field("username", "username", Field.Type.USERNAME);
/**
* A field describing the password HTTP parameter expected by Guacamole
* during login, if passwords are being used.
*/
public static final Field PASSWORD = new Field("password", "password", Field.Type.PASSWORD);
/** /**
* CredentialsInfo object which describes standard username/password * CredentialsInfo object which describes standard username/password
* credentials. * credentials.
*/ */
public static final CredentialsInfo USERNAME_PASSWORD = new CredentialsInfo(Arrays.asList( public static final CredentialsInfo USERNAME_PASSWORD = new CredentialsInfo(Arrays.asList(
new Field("username", "username", Field.Type.USERNAME), USERNAME,
new Field("password", "password", Field.Type.PASSWORD) PASSWORD
)); ));
} }