- Timestamp:
- 2023-07-27T15:47:48+02:00 (2 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
-
data/oauth/OAuth20Authorization.java (modified) (1 diff)
-
gui/preferences/server/OAuthAuthenticationPreferencesPanel.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/oauth/OAuth20Authorization.java
r18665 r18786 102 102 } catch (IOException | OAuth20Exception e) { 103 103 consumer.accept(Optional.empty()); 104 throw new JosmRuntimeException(e);104 throw new RequestHandler.RequestHandlerErrorException(e); 105 105 } finally { 106 106 tradeCodeForToken.disconnect(); 107 107 } 108 108 } catch (MalformedURLException e) { 109 throw new JosmRuntimeException(e); 109 consumer.accept(Optional.empty()); 110 throw new RequestHandler.RequestHandlerBadRequestException(e); 110 111 } 111 112 return null; -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java
r18764 r18786 21 21 import javax.swing.JCheckBox; 22 22 import javax.swing.JLabel; 23 import javax.swing.JOptionPane; 23 24 import javax.swing.JPanel; 24 25 … … 375 376 OAuthAccessTokenHolder.getInstance().save(CredentialsManager.getInstance()); 376 377 GuiHelper.runInEDT(OAuthAuthenticationPreferencesPanel.this::refreshView); 378 if (!token.isPresent()) { 379 GuiHelper.runInEDT(() -> JOptionPane.showMessageDialog(MainApplication.getMainPanel(), 380 tr("Authentication failed, please check browser for details."), 381 tr("OAuth Authentication Failed"), 382 JOptionPane.ERROR_MESSAGE)); 383 } 377 384 }, OsmScopes.read_gpx, OsmScopes.write_gpx, 378 385 OsmScopes.read_prefs, OsmScopes.write_prefs,
Note:
See TracChangeset
for help on using the changeset viewer.
