Changeset 12992 in josm for trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java
- Timestamp:
- 2017-10-14T00:09:56+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java
r12869 r12992 62 62 63 63 /* 64 * Last request was successful and there was no credentials stored 65 * in file (or only the username is stored). 66 * -> Try to recall credentials that have been entered 67 * manually in this session. 64 * Last request was successful and there was no credentials stored in file (or only the username is stored). 65 * -> Try to recall credentials that have been entered manually in this session. 68 66 */ 69 67 if (!noSuccessWithLastResponse && memoryCredentialsCache.containsKey(requestorType) && … … 89 87 response.getPassword() 90 88 )); 91 /*92 * User decides not to save credentials to file. Keep it93 * in memory so we don't have to ask over and over again.94 */95 89 } else { 96 PasswordAuthentication pa = new PasswordAuthentication(response.getUsername(), response.getPassword());97 memoryCredentialsCache.put(requestorType, pa);90 // User decides not to save credentials to file. Keep it in memory so we don't have to ask over and over again. 91 memoryCredentialsCache.put(requestorType, new PasswordAuthentication(response.getUsername(), response.getPassword())); 98 92 } 99 /*100 * We got it from file.101 */102 93 } else { 94 // We got it from file. 103 95 response.setUsername(username); 104 96 response.setPassword(password.toCharArray()); … … 106 98 } 107 99 return response; 100 } 101 102 @Override 103 public final void purgeCredentialsCache(RequestorType requestorType) { 104 memoryCredentialsCache.remove(requestorType); 108 105 } 109 106
Note:
See TracChangeset
for help on using the changeset viewer.