public final class DbxOAuth1Upgrader extends Object
createOAuth2AccessToken(com.dropbox.core.DbxOAuth1AccessToken)
to get an OAuth 2 access token. If that succeeds, call disableOAuth1AccessToken(com.dropbox.core.DbxOAuth1AccessToken)
to disable the OAuth 1 access token.Modifier and Type | Field and Description |
---|---|
static JsonReader<String> |
ResponseReader
For JSON parsing.
|
Constructor and Description |
---|
DbxOAuth1Upgrader(DbxRequestConfig requestConfig,
DbxAppInfo appInfo) |
Modifier and Type | Method and Description |
---|---|
String |
createOAuth2AccessToken(DbxOAuth1AccessToken token)
Given an existing active OAuth 1 access token, make a Dropbox API call to get a new OAuth 2
access token that represents the same user and app.
|
void |
disableOAuth1AccessToken(DbxOAuth1AccessToken token)
Tell the Dropbox API server to disable an OAuth 1 access token.
|
public static final JsonReader<String> ResponseReader
public DbxOAuth1Upgrader(DbxRequestConfig requestConfig, DbxAppInfo appInfo)
appInfo
- Your application's Dropbox API information (the app key and secret).public String createOAuth2AccessToken(DbxOAuth1AccessToken token) throws DbxException
DbxException
public void disableOAuth1AccessToken(DbxOAuth1AccessToken token) throws DbxException
DbxException