public class UserCredentials
extends java.lang.Object
Constructor and Description |
---|
UserCredentials()
Creates an empty instance
|
UserCredentials(java.lang.String username,
java.lang.String password)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPassword()
Returns the password.
|
java.lang.String |
getUsername()
Returns the user name (or session ID, if it was set before instead of an
username)
|
void |
setPassword(java.lang.String password)
Sets the password
|
void |
setUsername(java.lang.String username)
Sets the username (or session ID)
|
java.lang.String |
toString()
Formats user name and password.
|
public UserCredentials()
public UserCredentials(java.lang.String username, java.lang.String password)
username
- The username or alternatively a session ID (in which case
the password will be ignored)password
- The passwordpublic java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- The username or alternatively a session ID (in which case the
password will be ignored)public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- See abovepublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()