Changeset 4690 in josm for trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java
- Timestamp:
- 2011-12-21T23:12:59+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java
r4249 r4690 17 17 */ 18 18 @Override 19 public CredentialsAgentResponse getCredentials(RequestorType requestorType, boolean noSuccessWithLastResponse) throws CredentialsAgentException{19 public CredentialsAgentResponse getCredentials(RequestorType requestorType, String host, boolean noSuccessWithLastResponse) throws CredentialsAgentException{ 20 20 if (requestorType == null) 21 21 return null; 22 PasswordAuthentication credentials = lookup(requestorType );22 PasswordAuthentication credentials = lookup(requestorType, host); 23 23 String username = (credentials == null || credentials.getUserName() == null) ? "" : credentials.getUserName(); 24 24 String password = (credentials == null || credentials.getPassword() == null) ? "" : String.valueOf(credentials.getPassword()); … … 47 47 CredentialDialog dialog = null; 48 48 switch(requestorType) { 49 case SERVER: dialog = CredentialDialog.getOsmApiCredentialDialog(username, password, getSaveUsernameAndPasswordCheckboxText()); break;50 case PROXY: dialog = CredentialDialog.getHttpProxyCredentialDialog(username, password, getSaveUsernameAndPasswordCheckboxText()); break;49 case SERVER: dialog = CredentialDialog.getOsmApiCredentialDialog(username, password, host, getSaveUsernameAndPasswordCheckboxText()); break; 50 case PROXY: dialog = CredentialDialog.getHttpProxyCredentialDialog(username, password, host, getSaveUsernameAndPasswordCheckboxText()); break; 51 51 } 52 52 dialog.setVisible(true); … … 57 57 response.setPassword(dialog.getPassword()); 58 58 if (dialog.isSaveCredentials()) { 59 store(requestorType, new PasswordAuthentication(59 store(requestorType, host, new PasswordAuthentication( 60 60 response.getUsername(), 61 61 response.getPassword()
Note:
See TracChangeset
for help on using the changeset viewer.