public final class DbxOAuth1Upgrader
extends java.lang.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<java.lang.String> |
ResponseReader
For JSON parsing.
|
Constructor and Description |
---|
DbxOAuth1Upgrader(DbxRequestConfig requestConfig,
DbxAppInfo appInfo) |
Modifier and Type | Method and Description |
---|---|
java.lang.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<java.lang.String> ResponseReader
public DbxOAuth1Upgrader(DbxRequestConfig requestConfig, DbxAppInfo appInfo)
appInfo
- Your application's Dropbox API information (the app key and secret).public java.lang.String createOAuth2AccessToken(DbxOAuth1AccessToken token) throws DbxException
DbxException
public void disableOAuth1AccessToken(DbxOAuth1AccessToken token) throws DbxException
DbxException