public class Auth extends Object implements Serializable
AbstractService and using
AbstractService#getAuth() or AbstractService#authenticate(String).| Constructor and Description |
|---|
Auth()
Create an empty instance.
|
Auth(String userName,
char[] password)
Create an instance with the given values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the sensitive data from this
Auth instance. |
protected void |
finalize() |
char[] |
getPassword()
Get the password.
|
String |
getUserName()
Get the user-name.
|
void |
setPassword(char[] password)
Set the password.
|
void |
setUserName(String userName)
Set the user-name.
|
public Auth()
public String getUserName()
null.public void setUserName(String userName)
userName - the user-name or null.public char[] getPassword()
Get the password.
Warning: the char-array returned by this method might be modified later (overwritten with 0), e.g. if
clear() is called! If you want to use this char-array elsewhere, you must clone it immediately!
null.public void setPassword(char[] password)
Set the password.
Warning: the char-array passed to this method is modified (overwritten with 0), if
clear() is called! If you want to use this char-array elsewhere, you must pass
a clone here!
password - the password or null.public void clear()
Auth instance. If the password
is not null, it is overwritten with 0. This method is called by the
finalize() method of this class!Copyright © 2013-2014. All Rights Reserved.