Ignore:
Timestamp:
2017-10-06T15:17:51+02:00 (7 years ago)
Author:
bastiK
Message:

see #15229 - do not copy the entire preferences list, just to set a custom server API in OAuth wizard

File:
1 edited

Legend:

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

    r12869 r12928  
    114114    protected void addOAuthAuthorizationHeader(HttpClient connection) throws OsmTransferException {
    115115        if (oauthParameters == null) {
    116             oauthParameters = OAuthParameters.createFromPreferences(Main.pref);
     116            oauthParameters = OAuthParameters.createFromApiUrl(OsmApi.getOsmApi().getServerUrl());
    117117        }
    118118        OAuthConsumer consumer = oauthParameters.buildConsumer();
     
    146146            fetcher.obtainAccessToken(apiUrl);
    147147            OAuthAccessTokenHolder.getInstance().setSaveToPreferences(true);
    148             OAuthAccessTokenHolder.getInstance().save(Main.pref, CredentialsManager.getInstance());
     148            OAuthAccessTokenHolder.getInstance().save(CredentialsManager.getInstance());
    149149        } catch (MalformedURLException | InterruptedException | InvocationTargetException e) {
    150150            throw new MissingOAuthAccessTokenException(e);
Note: See TracChangeset for help on using the changeset viewer.