﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
23693	OAuth2.0 authentication issues	michael.montani95@…	team	"==== What steps will reproduce the problem?
1. Anytime on JOSM once already authenticated (case A: automatically with OAuth via registered parameters on JOSM settings, case B: manually authenticated or authenticated with Basic Authentication).

==== What is the expected result?
1. Normal functioning with no error pop ups.

==== What happens instead?
Case A: A popup with the following text appears:
""Authorisation Failed
Authorisation at the OSM server with the OAuth token ""xxx""
The token is not authorised to access the protected resource
""https://api.openstreetmap.org/api/0.6/user/details"".
Please launch the preferences dialog and retrieve another OAuth token.""
If I try to login with OAuth2.0, a popup appears:
""OAuth authorization failed
The automatic process for retrieving an OAuth Access Token from the OSM server failed.
Please try again or choose another kind of authorization process, i.e. semi-automatic or manual authorization""
Automatic and semi-automatic fails on v18427 and latest. Manual works on latest but did not try on v18427.

Case B: Once authenticated manually or via Basic Authentication, another popup appears automatically without doing anything particular:
""Authorisation Failed
Authorisation at the OSM server failed.
The server reported the following error: 'HTTP Basic Authentication is disabled: https://wiki.openstreetmap.org/wiki/2024_authentication_update (Code=403)', which makes sense as basic / manual authentication has been disabled.
Pressing OK, let's the pop up go away but it is possible to continue the session with no issues. The pop up reappears randomly after some time.

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
Revision:18427
Build-Date:2022-04-05 19:23:14

Identification: JOSM/1.5 (18427 en) Windows 11 64-Bit
OS Build number: Windows 10 Home 2009 (22631)
Memory Usage: 358 MB / 4046 MB (170 MB allocated, but free)
Java version: 17.0.2+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_IT
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18427, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]
Dataset consistency test: No problems found

Plugins:
+ FastDraw (35893)
+ ImportImagePlugin (36184)
+ RelationDissolve (0.2.0)
+ apache-commons (36176)
+ buildings_tools (36226)
+ ejml (36176)
+ fieldpapers (v0.5.0)
+ geotools (36176)
+ jackson (36176)
+ jaxb (36118)
+ jts (36004)
+ opendata (35910)
+ reltoolbox (36241)
+ reverter (36066)
+ utilsplugin2 (35970)

Map paint styles:
- %UserProfile%\MEGA\UN\Mapping\<user.name>.mapcss

Last errors/warnings:
- 00000.485 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.487 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00000.932 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available
- 00014.414 E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=403, Error Header=<Die HTTP-Basisauthentifizierung ist deaktiviert: https://wiki.openstreetmap.org/wiki/DE:2024_authentication_update>
- 00014.440 E: Authorisation Failed - <html>Authorisation at the OSM server failed.<br>The server reported the following error:<br>'Die HTTP-Basisauthentifizierung ist deaktiviert: https://wiki.openstreetmap.org/wiki/DE:2024_authentication_update (Code=403)'</html>
- 00617.861 E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=403, Error Header=<HTTP Basic Authentication is disabled: https://wiki.openstreetmap.org/wiki/2024_authentication_update>
- 00617.866 E: Authorisation Failed - <html>Authorisation at the OSM server failed.<br>The server reported the following error:<br>'HTTP Basic Authentication is disabled: https://wiki.openstreetmap.org/wiki/2024_authentication_update (Code=403)'</html>
- 01164.808 E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=403, Error Header=<HTTP Basic Authentication is disabled: https://wiki.openstreetmap.org/wiki/2024_authentication_update>
- 01164.812 E: Authorisation Failed - <html>Authorisation at the OSM server failed.<br>The server reported the following error:<br>'HTTP Basic Authentication is disabled: https://wiki.openstreetmap.org/wiki/2024_authentication_update (Code=403)'</html>
}}}
"	defect	closed	major		Core		invalid	OAuth authentication	
