Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5100 closed defect (fixed)

Cannot Retrieve OAuth Request Token

Reported by: iovan4o Owned by: team
Priority: critical Component: Core
Version: tested Keywords: OAuth
Cc:

Description

I run josm-tested version 3208,
I go to Preferences->Connection Settings->Authentication, select "Use OAuth" and click the "Authorize now" button. In the "Get an Access Token..." dialog I select Semi-automatic procedure. After I click "Retrieve Request Token" button an error dialog appears with the following message:
Retrieving an OAuth Request Token from 'http://www.openstreetmap.org/oauth/request_token' failed.
In the console there is the following exception:

org.openstreetmap.josm.gui.oauth.OsmOAuthAuthorizationException: oauth.signpost.exception.OAuthNotAuthorizedException:
Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match.
        at org.openstreetmap.josm.gui.oauth.OsmOAuthAuthorizationClient.getRequestToken(OsmOAuthAuthorizationClient.java:141)
        at org.openstreetmap.josm.gui.oauth.RetrieveRequestTokenTask.realRun(RetrieveRequestTokenTask.java:79)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:83)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:129)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: oauth.signpost.exception.OAuthNotAuthorizedException: Authorization failed (server replied with a 401).
This can happen if the consumer key was not correct or the signatures did not match.
        at oauth.signpost.basic.DefaultOAuthProvider.retrieveToken(DefaultOAuthProvider.java:143)
        at oauth.signpost.basic.DefaultOAuthProvider.retrieveRequestToken(DefaultOAuthProvider.java:79)
        at org.openstreetmap.josm.gui.oauth.OsmOAuthAuthorizationClient.getRequestToken(OsmOAuthAuthorizationClient.java:132)
        ... 9 more

Regards,
Ivan

Attachments (0)

Change History (11)

comment:1 Changed 3 years ago by toje@…

  • Keywords OAuth added
  • Version set to tested

I am also getting this error. The core problem seems to be that the OSM OAuth server returns a 401 error code:

org.openstreetmap.josm.gui.oauth.OsmOAuthAuthorizationException: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: Server returned HTTP response code: 401 for URL: http://www.openstreetmap.org/oauth/request_token

Could it be that there's something broken with the way JOSM generates it's OAuth request token?

A working OAuth would be very much appreciated by me, as I usually don't like sending any authentication data in the clear (for hopefully obvious reasons).

Greetings from Stuttgart,

=ToJe=

comment:2 Changed 3 years ago by Sellerhaeuser

  • Cc josm-trac@… added

Same here: Fully automatic doens't work at all, semi-automatic returns above mentioned error code 401
used manual procedure, tried to test the Access Token returns error:

Failed to access the OSM server 'http://api.openstreetmap.org/api' with the Access Token 'http://api.openstreetmap.org/api'. ...

It seems that there is an error with some variables, the server address shouldn't be the Access Token

comment:3 Changed 3 years ago by Sellerhaeuser

Tested again and it works for me ... (Version 3376)
Haven't changed anything since the last comment

comment:4 Changed 3 years ago by Sellerhaeuser

  • Cc josm-trac@… removed

Tested again with different systems (Windows, Linux), requested new token, testing token access and it works on all of them

seems not to be an error of JOSM

comment:5 Changed 3 years ago by stoecker

  • Resolution set to irreproducible
  • Status changed from new to closed

comment:6 Changed 3 years ago by bastiK

  • Resolution irreproducible deleted
  • Status changed from closed to reopened

@Stoecker can you request a token?

It is still broken for me.

comment:7 Changed 3 years ago by stoecker

Yes. Had no problems when I tried.

comment:8 Changed 3 years ago by stoecker

Ah, rechecked and is broken in latest. Probably caused by the latest signpost-update.

comment:9 Changed 3 years ago by stoecker

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [3494]) fix #5100 - OAuth failing

comment:10 Changed 3 years ago by stoecker

Ticket #5392 has been marked as a duplicate of this ticket.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.