source: josm/trunk/test/unit/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUITest.java@ 18991

Last change on this file since 18991 was 18991, checked in by taylor.smock, 3 months ago

Fix #22810: OSM OAuth 1.0a/Basic auth deprecation and removal

As of 2024-02-15, something changed in the OSM server configuration. This broke
our OAuth 1.0a implementation (see #23475). As such, we are removing OAuth 1.0a
from JOSM now instead of when the OSM server removes support in June 2024.

For third-party OpenStreetMap servers, the Basic Authentication method has been
kept. However, they should be made aware that it may be removed if a non-trivial
bug occurs with it. We highly recommend that the third-party servers update to
the current OpenStreetMap website implementation (if only for their own security).

Failing that, the third-party server can implement RFC8414. As of this commit,
we currently use the authorization_endpoint and token_endpoint fields.
To check and see if their third-party server implements RFC8414, they can go
to <server host>/.well-known/oauth-authorization-server.

Prominent third-party OpenStreetMap servers may give us a client id for their
specific server. That client id may be added to the hard-coded client id list
at maintainer discretion. At a minimum, the server must be publicly
available and have a significant user base.

  • Property svn:eol-style set to native
File size: 915 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.oauth;
3
4import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
5
6import org.junit.jupiter.params.ParameterizedTest;
7import org.junit.jupiter.params.provider.EnumSource;
8import org.openstreetmap.josm.data.oauth.OAuthVersion;
9import org.openstreetmap.josm.gui.MainApplication;
10import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
11
12/**
13 * Unit tests of {@link FullyAutomaticAuthorizationUI} class.
14 */
15@BasicPreferences
16class FullyAutomaticAuthorizationUITest {
17 /**
18 * Unit test of {@link FullyAutomaticAuthorizationUI#FullyAutomaticAuthorizationUI}.
19 */
20 @ParameterizedTest
21 @EnumSource(OAuthVersion.class)
22 void testFullyAutomaticAuthorizationUI(OAuthVersion version) {
23 assertDoesNotThrow(() -> new FullyAutomaticAuthorizationUI("", MainApplication.worker, version));
24 }
25}
Note: See TracBrowser for help on using the repository browser.