Package com.dropbox.core
Class DbxOAuth1Upgrader
- java.lang.Object
-
- com.dropbox.core.DbxOAuth1Upgrader
-
public final class DbxOAuth1Upgrader extends java.lang.Object
Lets 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 Summary
Fields Modifier and Type Field Description static JsonReader<java.lang.String>
ResponseReader
For JSON parsing.
-
Constructor Summary
Constructors Constructor Description DbxOAuth1Upgrader(DbxRequestConfig requestConfig, DbxAppInfo appInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
ResponseReader
public static final JsonReader<java.lang.String> ResponseReader
For JSON parsing.
-
-
Constructor Detail
-
DbxOAuth1Upgrader
public DbxOAuth1Upgrader(DbxRequestConfig requestConfig, DbxAppInfo appInfo)
- Parameters:
appInfo
- Your application's Dropbox API information (the app key and secret).
-
-
Method Detail
-
createOAuth2AccessToken
public 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
-
disableOAuth1AccessToken
public void disableOAuth1AccessToken(DbxOAuth1AccessToken token) throws DbxException
Tell the Dropbox API server to disable an OAuth 1 access token.- Throws:
DbxException
-
-