Class UserIdentityManager

  • All Implemented Interfaces:
    PreferenceChangedListener

    public final class UserIdentityManager
    extends Object
    implements PreferenceChangedListener
    UserIdentityManager is a global object which keeps track of what JOSM knows about the identity of the current user. JOSM can be operated anonymously provided the current user never invokes an operation on the OSM server which required authentication. In this case JOSM neither knows the user name of the OSM account of the current user nor its unique id. Perhaps the user doesn't have one. If the current user supplies a user name and a password in the JOSM preferences JOSM can partially identify the user. The current user is fully identified if JOSM knows both the user name and the unique id of the users OSM account. The latter is retrieved from the OSM server with a GET /api/0.6/user/details request, submitted with the user name and password of the current user. The global UserIdentityManager listens to PreferenceChangeEvents and keeps track of what the current JOSM instance knows about the current user. Other subsystems can let the global UserIdentityManager know in case they fully identify the current user, see setFullyIdentified(java.lang.String, org.openstreetmap.josm.data.osm.UserInfo). The information kept by the UserIdentityManager can be used to
    • safely query changesets owned by the current user based on its user id, not on its user name
    • safely search for objects last touched by the current user based on its user id, not on its user name
    Since:
    12743 (renamed from org.openstreetmap.josm.gui.JosmUserIdentityManager), 2689 (creation)