Class CredentialsAgentResponse

java.lang.Object
org.openstreetmap.josm.io.auth.CredentialsAgentResponse

public class CredentialsAgentResponse extends Object
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 Details

  • Constructor Details

  • Method Details

    • 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)