Changeset 13173 in josm for trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
- Timestamp:
- 2017-11-28T00:56:29+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
r12928 r13173 29 29 import javax.swing.text.html.HTMLEditorKit; 30 30 31 import org.openstreetmap.josm.data.Preferences;32 31 import org.openstreetmap.josm.data.oauth.OAuthToken; 33 32 import org.openstreetmap.josm.gui.HelpAwareOptionPane; … … 174 173 public void initialize(String paramApiUrl) { 175 174 super.initialize(paramApiUrl); 176 CredentialsAgent cm = CredentialsManager.getInstance();177 try {178 PasswordAuthentication pa = cm.lookup(RequestorType.SERVER, OsmApi.getOsmApi().getHost());179 if (pa == null) {180 tfUserName.setText("");181 tfPassword.setText("");182 } else {183 tfUserName.setText(pa.getUserName() == null ? "" : pa.getUserName());184 tfPassword.setText(pa.getPassword() == null ? "" : String.valueOf(pa.getPassword()));185 }186 } catch (CredentialsAgentException e) {187 Logging.error(e);188 tfUserName.setText("");189 tfPassword.setText("");190 }191 }192 193 /**194 * Initializes the panel with values from the preferences195 * @param pref Preferences structure196 * @deprecated (since 12928) replaced by {@link #initialize(java.lang.String)}197 */198 @Deprecated199 @Override200 public void initFromPreferences(Preferences pref) {201 super.initFromPreferences(pref);202 175 CredentialsAgent cm = CredentialsManager.getInstance(); 203 176 try {
Note:
See TracChangeset
for help on using the changeset viewer.