Changeset 4692 in josm for trunk


Ignore:
Timestamp:
2011-12-21T23:39:12+01:00 (12 years ago)
Author:
stoecker
Message:

see #7086 - save other passwords in JOSM prefs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java

    r4690 r4692  
    3737                user = Main.pref.get("osm-server.username", null);
    3838                password = Main.pref.get("osm-server.password", null);
     39            } else if(host != null) {
     40                user = Main.pref.get("server.username."+host, null);
     41                password = Main.pref.get("server.password."+host, null);
    3942            } else {
    4043                user = null;
     
    6972                } else {
    7073                    Main.pref.put("osm-server.password", String.valueOf(credentials.getPassword()));
     74                }
     75            } else if(host != null) {
     76                Main.pref.put("server.username."+host, credentials.getUserName());
     77                if (credentials.getPassword() == null) {
     78                    Main.pref.put("server.password."+host, null);
     79                } else {
     80                    Main.pref.put("server.password."+host, String.valueOf(credentials.getPassword()));
    7181                }
    7282            }
Note: See TracChangeset for help on using the changeset viewer.