Package org.openstreetmap.josm.io.auth
Class CredentialsAgentResponse
java.lang.Object
org.openstreetmap.josm.io.auth.CredentialsAgentResponse
CredentialsAgentResponse represents the response from
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.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchar[]Replies the passwordReplies the user namebooleanDetermines if authentication request has been canceled by userbooleanDetermines 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(String username) Sets the user name
-
Field Details
-
username
-
password
-
canceled
-
saveCredentials
-
-
Constructor Details
-
CredentialsAgentResponse
public CredentialsAgentResponse()
-
-
Method Details
-
getUsername
Replies the user name- Returns:
- The user name
-
setUsername
Sets the user name- Parameters:
username- The user name
-
getPassword
Replies the password- Returns:
- The password in plain text
-
setPassword
Sets the password- Parameters:
password- The password in plain text
-
isCanceled
Determines if authentication request has been canceled by user- Returns:
- true if authentication request has been canceled by user, false otherwise
-
setCanceled
Sets the cancellation status (authentication request canceled by user)- Parameters:
canceled- the cancellation status (authentication request canceled by user)
-
isSaveCredentials
Determines if authentication credentials should be saved- Returns:
- true if authentication credentials should be saved, false otherwise
-
setSaveCredentials
Sets the saving status (authentication credentials to save)- Parameters:
saveCredentials- the saving status (authentication credentials to save)
-