Changeset 9313 in josm for trunk/src/org


Ignore:
Timestamp:
2016-01-04T23:40:53+01:00 (4 years ago)
Author:
simon04
Message:

fix #8050 - Make OSM API OAuth and imagery HTTP authentication work

Fix: When using OAuth for access to API server, imagery requiring username/password will not prompt for username and password

File:
1 edited

Legend:

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

    r8846 r9313  
    66import java.util.EnumMap;
    77import java.util.Map;
     8import java.util.Objects;
    89
    910import org.openstreetmap.josm.Main;
     
    4748            return null;
    4849        try {
    49             if (getRequestorType().equals(Authenticator.RequestorType.SERVER) && OsmApi.isUsingOAuth()) {
     50            if (OsmApi.isUsingOAuth()
     51                    && Objects.equals(OsmApi.getOsmApi().getHost(), getRequestingHost())
     52                    && RequestorType.SERVER.equals(getRequestorType())) {
    5053                // if we are working with OAuth we don't prompt for a password
    5154                return null;
Note: See TracChangeset for help on using the changeset viewer.