Package org.openstreetmap.josm.io.auth
Class CredentialsAgentResponse
- java.lang.Object
-
- org.openstreetmap.josm.io.auth.CredentialsAgentResponse
-
public class CredentialsAgentResponse extends java.lang.Object
CredentialsAgentResponse represents the response fromCredentialsAgent.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 (seeisCanceled(). It also provides information whether authentication should be saved.
-
-
Field Summary
Fields Modifier and Type Field Description private booleancanceledprivate char[]passwordprivate booleansaveCredentialsprivate java.lang.Stringusername
-
Constructor Summary
Constructors Constructor Description CredentialsAgentResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char[]getPassword()Replies the passwordjava.lang.StringgetUsername()Replies the user namebooleanisCanceled()Determines if authentication request has been canceled by userbooleanisSaveCredentials()Determines if authentication credentials should be savedvoidsetCanceled(boolean canceled)Sets the cancellation status (authentication request canceled by user)voidsetPassword(char[] password)Sets the passwordvoidsetSaveCredentials(boolean saveCredentials)Sets the saving status (authentication credentials to save)voidsetUsername(java.lang.String username)Sets the user name
-
-
-
Field Detail
-
username
private java.lang.String username
-
password
private char[] password
-
canceled
private boolean canceled
-
saveCredentials
private boolean saveCredentials
-
-
Constructor Detail
-
CredentialsAgentResponse
public CredentialsAgentResponse()
-
-
Method Detail
-
getUsername
public java.lang.String getUsername()
Replies the user name- Returns:
- The user name
-
setUsername
public void setUsername(java.lang.String username)
Sets the user name- Parameters:
username- The user name
-
getPassword
public char[] getPassword()
Replies the password- Returns:
- The password in plain text
-
setPassword
public void setPassword(char[] password)
Sets the password- Parameters:
password- The password in plain text
-
isCanceled
public boolean isCanceled()
Determines if authentication request has been canceled by user- Returns:
- true if authentication request has been canceled by user, false otherwise
-
setCanceled
public void setCanceled(boolean canceled)
Sets the cancellation status (authentication request canceled by user)- Parameters:
canceled- the cancellation status (authentication request canceled by user)
-
isSaveCredentials
public boolean isSaveCredentials()
Determines if authentication credentials should be saved- Returns:
- true if authentication credentials should be saved, false otherwise
-
setSaveCredentials
public void setSaveCredentials(boolean saveCredentials)
Sets the saving status (authentication credentials to save)- Parameters:
saveCredentials- the saving status (authentication credentials to save)
-
-