Further documentation updates and improvements
[remote/remote-ws.git] / src / authentication / Credential.java
blob5f2fd7d1a303696688319ef69af3144e06972582
1 package authentication;
3 import java.io.Serializable;
5 /** Authentication credential field.
7 * This class corresponds to one credential value that should be
8 * exchanged between the client and server in order to authenticate the
9 * client. Credentials containing secret values, such as passwords, can
10 * be marked hidden.
12 public class Credential implements Serializable{
14 private static final long serialVersionUID = -1425162133341080154L;
15 private String label, value;
16 private boolean hidden;
18 /** Create field with given label and hidden attribute.
20 * @param label The field label.
21 * @param hidden Whether the field should be hidden.
23 public Credential(String label, boolean hidden)
25 super();
26 this.label = label;
27 this.value = null;
28 this.hidden = hidden;
31 /** Dummy constructor to silence compiler. */
32 public Credential()
34 this(null, false);
37 /** Is field value hidden?
39 * @return Whether the field is hidden.
41 public boolean isHideValue()
43 return hidden;
46 /** Change hidden attribute of a field value.
48 * @param hidden The new state of the hidden attribute.
50 public void setHideValue(boolean hidden)
52 this.hidden = hidden;
55 /** Get field label.
57 * @return The field label.
59 public String getLabel()
61 return label;
64 /** Set field label.
66 * @param label The field label.
68 public void setLabel(String label)
70 this.label = label;
73 /** Get field value.
75 * @return The field value.
77 public String getValue()
79 return value;
82 /** Set field value.
84 * @param value The new field value.
86 public void setValue(String value)
88 this.value = value;