source: josm/trunk/src/org/openstreetmap/josm/data/oauth/IOAuthToken.java@ 18650

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

Fix #20768: Add OAuth 2.0 support

This also fixes #21607: authentication buttons are unavailable when credentials
are set.

File size: 896 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.oauth;
3
4import org.openstreetmap.josm.tools.HttpClient;
5
6/**
7 * An interface for oauth tokens
8 * @author Taylor Smock
9 * @since 18650
10 */
11public interface IOAuthToken {
12 /**
13 * Sign a client
14 * @param client The client to sign
15 */
16 void sign(HttpClient client) throws OAuthException;
17
18 /**
19 * Get the preferences string of this auth token.
20 * This should match the expected return body from the authentication server.
21 * For OAuth, this is typically JSON.
22 * @return The preferences string
23 */
24 String toPreferencesString();
25
26 /**
27 * Get the auth type of this token
28 * @return The auth type
29 */
30 OAuthVersion getOAuthType();
31
32 /**
33 * Get the OAuth parameters
34 * @return The OAuth parameters
35 */
36 IOAuthParameters getParameters();
37}
Note: See TracBrowser for help on using the repository browser.