Package org.openstreetmap.josm.io.auth
Class CredentialsAgentResponse
- java.lang.Object
-
- org.openstreetmap.josm.io.auth.CredentialsAgentResponse
-
public class CredentialsAgentResponse extends 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 boolean
canceled
private char[]
password
private boolean
saveCredentials
private String
username
-
Constructor Summary
Constructors Constructor Description CredentialsAgentResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char[]
getPassword()
Replies the passwordString
getUsername()
Replies the user nameboolean
isCanceled()
Determines if authentication request has been canceled by userboolean
isSaveCredentials()
Determines if authentication credentials should be savedvoid
setCanceled(boolean canceled)
Sets the cancellation status (authentication request canceled by user)void
setPassword(char[] password)
Sets the passwordvoid
setSaveCredentials(boolean saveCredentials)
Sets the saving status (authentication credentials to save)void
setUsername(String username)
Sets the user name
-
-
-
Field Detail
-
password
private char[] password
-
canceled
private boolean canceled
-
saveCredentials
private boolean saveCredentials
-
-
Constructor Detail
-
CredentialsAgentResponse
public CredentialsAgentResponse()
-
-
Method Detail
-
getUsername
public String getUsername()
Replies the user name- Returns:
- The user name
-
setUsername
public void setUsername(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)
-
-