Package com.dropbox.core
Class DbxOAuth1Upgrader
- java.lang.Object
- 
- com.dropbox.core.DbxOAuth1Upgrader
 
- 
 public final class DbxOAuth1Upgrader extends java.lang.ObjectLets you convert OAuth 1 access tokens to OAuth 2 access tokens. First callcreateOAuth2AccessToken(com.dropbox.core.DbxOAuth1AccessToken)to get an OAuth 2 access token. If that succeeds, calldisableOAuth1AccessToken(com.dropbox.core.DbxOAuth1AccessToken)to disable the OAuth 1 access token.
- 
- 
Field SummaryFields Modifier and Type Field Description static JsonReader<java.lang.String>ResponseReaderFor JSON parsing.
 - 
Constructor SummaryConstructors Constructor Description DbxOAuth1Upgrader(DbxRequestConfig requestConfig, DbxAppInfo appInfo)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcreateOAuth2AccessToken(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.voiddisableOAuth1AccessToken(DbxOAuth1AccessToken token)Tell the Dropbox API server to disable an OAuth 1 access token.
 
- 
- 
- 
Field Detail- 
ResponseReaderpublic static final JsonReader<java.lang.String> ResponseReader For JSON parsing.
 
- 
 - 
Constructor Detail- 
DbxOAuth1Upgraderpublic DbxOAuth1Upgrader(DbxRequestConfig requestConfig, DbxAppInfo appInfo) - Parameters:
- appInfo- Your application's Dropbox API information (the app key and secret).
 
 
- 
 - 
Method Detail- 
createOAuth2AccessTokenpublic java.lang.String createOAuth2AccessToken(DbxOAuth1AccessToken token) throws DbxException 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.- Throws:
- DbxException
 
 - 
disableOAuth1AccessTokenpublic void disableOAuth1AccessToken(DbxOAuth1AccessToken token) throws DbxException Tell the Dropbox API server to disable an OAuth 1 access token.- Throws:
- DbxException
 
 
- 
 
-