001 // License: GPL. For details, see LICENSE file. 002 package org.openstreetmap.josm.io.auth; 003 004 /** 005 * CredentialsAgentResponse represents the response from {@link CredentialsAgent#getCredentials(java.net.Authenticator.RequestorType, boolean)}. 006 * 007 * The response consists of the username and the password the requested credentials consists of. 008 * In addition, it provides information whether authentication was canceled by the user, i.e. 009 * because he or she canceled a username/password dialog (see {@link #isCanceled()}. 010 * 011 */ 012 public class CredentialsAgentResponse { 013 private String username; 014 private char[] password; 015 private boolean canceled; 016 public String getUsername() { 017 return username; 018 } 019 public void setUsername(String username) { 020 this.username = username; 021 } 022 public char[] getPassword() { 023 return password; 024 } 025 public void setPassword(char[] password) { 026 this.password = password; 027 } 028 public boolean isCanceled() { 029 return canceled; 030 } 031 public void setCanceled(boolean canceled) { 032 this.canceled = canceled; 033 } 034 }