public class CredentialsAgentResponse extends java.lang.Object
CredentialsAgent.getCredentials(java.net.Authenticator.RequestorType, String, boolean)
.
The response consists of the username and the password the requested credentials consists of.
In addition, it provides information whether authentication was canceled by the user, i.e.
because he or she canceled a username/password dialog (see isCanceled()
.
It also provides information whether authentication should be saved.Modifier and Type | Field and Description |
---|---|
private boolean |
canceled |
private char[] |
password |
private boolean |
saveCredentials |
private java.lang.String |
username |
Constructor and Description |
---|
CredentialsAgentResponse() |
Modifier and Type | Method and Description |
---|---|
char[] |
getPassword()
Replies the password
|
java.lang.String |
getUsername()
Replies the user name
|
boolean |
isCanceled()
Determines if authentication request has been canceled by user
|
boolean |
isSaveCredentials()
Determines if authentication credentials should be saved
|
void |
setCanceled(boolean canceled)
Sets the cancelation status (authentication request canceled by user)
|
void |
setPassword(char[] password)
Sets the password
|
void |
setSaveCredentials(boolean saveCredentials)
Sets the saving status (authentication credentials to save)
|
void |
setUsername(java.lang.String username)
Sets the user name
|
private java.lang.String username
private char[] password
private boolean canceled
private boolean saveCredentials
public CredentialsAgentResponse()
public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- The user namepublic char[] getPassword()
public void setPassword(char[] password)
password
- The password in plain textpublic boolean isCanceled()
public void setCanceled(boolean canceled)
canceled
- the cancelation status (authentication request canceled by user)public boolean isSaveCredentials()
public void setSaveCredentials(boolean saveCredentials)
saveCredentials
- the saving status (authentication credentials to save)