| 36 | | If you work '''anonymously''' you are allowed |
| 37 | | * to download geo-data from the OSM server and save it to a local file |
| 38 | | * to download public GPS traces from the OSM server |
| 39 | | * to load geo data from a file, edit it, and save it back to a file |
| | 35 | If you work **anonymously** you are allowed |
| | 36 | * to download geo-data from the OSM server and save it to a local file |
| | 37 | * to download public GPS traces from the OSM server |
| | 38 | * to load geo data from a file, edit it, and save it back to a file |
| 60 | | {{{ |
| 61 | | #!html |
| 62 | | <p style="background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid; border-width: 1px;"> |
| 63 | | <strong>Warning!</strong><br/> |
| 64 | | The password is stored in plain text in the JOSM preferences file. |
| 65 | | Furthermore, it is transferred <strong>unencrypted</strong> in every request sent to the OSM server. |
| 66 | | <strong>Do not use a valuable password.</strong> |
| 67 | | </p> |
| 68 | | }}} |
| | 59 | === OAuth 2.0 based authentication ===#oauth2 |
| | 60 | [https://oauth.net/2 OAuth 2.0] is an open protocol to allow secure API authorization in a simple and standard method from desktop and web applications. The OSM server supports OAuth 2.0 in addition to basic authentication. |
| | 61 | |
| | 62 | OAuth has two major advantages over basic authentication: |
| | 63 | 1. Your OSM password doesn't have to be saved in clear text in the JOSM preferences file. |
| | 64 | 1. Your OSM password has to be transferred encrypted **only once** over the Internet, in contrast to basic authentication where your OSM password is transferred unencrypted as part of every request sent from JOSM to the OSM server. |
| | 65 | |
| | 66 | OAuth 2.0 uses [wikitr:/Help/Preferences/RemoteControl Remote Control] to receive the token from the OAuth server. If Remote Control is disabled in preferences (default setting) it is temporally enabled to receive the token and then disabled again. |
| | 67 | **Note**: If you have issues authenticating, you can disable remote control in other running instances of JOSM and disable ''then'' re-enable it in the JOSM instance you are trying to authenticate. |
| | 68 | |
| | 69 | Once initialized the access token is represented with the following options: |
| | 70 | |
| | 71 | [[Image(oauth-2-authentication.png,500,link=)]] |
| | 72 | |
| | 73 | * Deselect the checkbox **Save to preferences** if you don't want to save the Access Token in the JOSM preferences. If you don't save it the Access Token will be lost when you close JOSM. If you later startup JOSM again you will have to retrieve a new Access Token to work with OAuth based authentication again. |
| | 74 | * Click on **Test Access Token** to submit a test request with the token to the OSM server. JOSM will analyze whether this token is authorized to access the OSM server. |
| | 75 | * Click on **Remove token** to remove the current token. The `Authorise now` button will reappear. |
| | 76 | * Selecting the checkbox "Display Advanced OAuth Parameters" to get the [wikitr:/Help/Dialog/OAuthAuthorisationWizard#AdvancedOAuthparameters advanced OAuth parameters] displayed. |
| 74 | | OAuth has two major advantages over basic authentication: |
| 75 | | 1. Your OSM password doesn't have to be saved in clear text in the JOSM preferences file. |
| 76 | | 2. Your OSM password has to be transferred '''only once''' over the Internet, in contrast to basic authentication where your OSM password is transferred as part of every request sent from JOSM to the OSM server. |
| 77 | | |
| 78 | | {{{ |
| 79 | | #!html |
| 80 | | <p style="background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid; border-width: 1px;"> |
| 81 | | <strong>Warning!</strong><br/> |
| 82 | | Currently, the OSM server doesn't offer a secure communication channel. Even if you use OAuth your password is therefore transferred <strong>once in clear text</strong> over the Internet. <strong>Do not use a valuable password</strong> until the OSM server provides a secure communication channel (HTTPS). |
| 83 | | </p> |
| 84 | | }}} |
| 85 | | |
| 86 | | For advanced users, OAuth has additional advantages: |
| 87 | | * With OAuth you can generate restricted Access Tokens which you given somebody else such that another mapper can act on your behalf. For instance, a mapper could generate an Access Token which grants somebody else the right to download its private GPS traces. Even if he gives this Access Token to somebody else, his OSM password is kept private. In addition, he can revoke the special Access Token at any time. JOSM supports this kind of advanced configuration in the [wiki:/Help/Dialog/OAuthAuthorisationWizard OAuth Authorisation Wizard] with the authorisation procedure '''Manual authorization'''. |
| 88 | | |
| 89 | | To use OAuth based Authentication |
| 90 | | |
| 91 | | 1. In the Connection Preferences go to the tab '''Authentication''' |
| 92 | | 2. Select the authentication method '''OAuth based authentication''' |
| 93 | | 3. Click on '''Authorise now''' to launch the [wiki:/Help/Dialog/OAuthAuthorisationWizard OAuth Authorisation Wizard] (see screenshot below) |
| 94 | | |
| 95 | | [[Image(oauth-preferences-step-1.png)]] |
| 96 | | |
| 97 | | This will launch the [wiki:/Help/Dialog/OAuthAuthorisationWizard OAuth Authorisation Wizard]. Use one of the available authorization procedures in this dialog to get a valid '''Access Token'''. |
| 98 | | |
| 99 | | JOSM displays the retrieved Access Token in the preferences panel (see screenshot below): |
| 100 | | |
| 101 | | [[Image(oauth-preferences-step-2.png)]] |
| 102 | | |
| 103 | | Deselect the checkbox '''Save to preferences''' if you don't want to save the Access Token in the JOSM preferences. If you don't save it the Access Token will be lost when you close JOSM. If you later startup JOSM again you will have to retrieve a new Access Token to work with OAuth based authentication again. |
| 104 | | |
| 105 | | Click on '''Test Access Token''' to submit a test request with the token to the OSM server. JOSM will analyse whether this token is authorized to access the OSM server. |
| 106 | | |
| 107 | | Click on '''New Access Token''' to generate a new Access Token. |
| 108 | | |
| 109 | | ==== Advanced OAuth parameters ==== |
| 110 | | Select the checkbox '''Display Advanced OAuth parameters''' to display the important OAuth parameters |
| 111 | | * the [http://oauth.net/core/1.0/#anchor3 Consumer Key] and the [http://oauth.net/core/1.0/#anchor3 Consumer Secret] identifying JOSM as OAuth consumer |
| 112 | | * the Request Token URL where JOSM can retrieve [http://oauth.net/core/1.0/#anchor3 Request Tokens] |
| 113 | | * the Access Token URL where JOSM can retrieve [http://oauth.net/core/1.0/#anchor3 Access Tokens] |
| 114 | | * the Authorise URL where JOSM users are redirected to to authorise a Request Token |
| 115 | | |
| 116 | | [[Image(oauth-advanced.png)]] |
| 117 | | |
| 118 | | == Proxy Settings == #ProxySettings |
| 119 | | JOSM communicates with the OSM server using the Hypertext Transfer Protocol ([http://en.wikipedia.org/wiki/Http HTTP]). If required it can relay its requests through a [http://en.wikipedia.org/wiki/Http_proxy HTTP proxy] or a [http://en.wikipedia.org/wiki/SOCKS SOCKS proxy]. |
| 120 | | |
| 121 | | 1. Go to the tab '''Proxy settings''' in the Connection Preferences |
| 122 | | 2. Select one of the available options and enter additional configuration parameters |
| 123 | | 3. Save the preferences |
| 124 | | |
| 125 | | [[Image(proxy-settings.png)]] |
| | 83 | === Max age of closed OSM Notes ===#OSMNotes |
| | 84 | The maximum age in days of closed [wikitr:/Help/Dialog/Notes OSM Notes] can be set (''advanced preference'': `osm.notes.daysClosed`). The default value is `7` days. See [wikitr:/Help/Dialog/Notes#AdvancedPreferences Advanced preferences for notes] for details. |
| 128 | | === Using the standard system proxy === |
| 129 | | If you always want to use the proxy defined as standard proxy on your computer you have to start up JOSM with a special command. The command line has to include the parameter {{{-Djava.net.useSystemProxies=true}}}, for instance |
| 130 | | |
| 131 | | {{{java -Djava.net.useSystemProxies=true -jar josm.jar}}} |
| | 87 | == Overpass server ==#OverpassServer |
| | 88 | ''**([wikitr:/Help/ExpertMode Expert mode] only)**'' \\ |
| | 89 | Configure the Overpass API instance used for downloading OSM data (for instance in [wikitr:/Help/Action/Download#DownloadfromOverpassAPI Download from Overpass API]) (''advanced preference'': `download.overpass.server`). See [osmwiki:Overpass_API#Public_Overpass_API_instances for a list of servers]. \\ |
| | 90 | With a checked ''**Use Overpass server for object downloads**'' the overpass server is used for all actions which request to download specified objects like [wikitr:/Help/Action/DownloadObject Download Object], [wikitr:/Help/Action/DownloadParentWaysAndRelation Download parent ways/relations …] or downloading (incomplete) members of relations (''advanced preference'': `download.overpass.for-multi-fetch`). |