Search in sources :

Example 26 with DbxRequestConfig

use of com.dropbox.core.DbxRequestConfig in project jbpm-work-items by kiegroup.

the class DropboxAuth method authorize.

public DbxClientV2 authorize(String clientIdentifier, String accessToken) throws IllegalArgumentException {
    try {
        DbxRequestConfig config = new DbxRequestConfig(clientIdentifier);
        DbxClientV2 client = new DbxClientV2(config, accessToken);
        return client;
    } catch (Exception e) {
        throw new IllegalArgumentException(e.getMessage());
    }
}
Also used : DbxClientV2(com.dropbox.core.v2.DbxClientV2) DbxRequestConfig(com.dropbox.core.DbxRequestConfig)

Aggregations

DbxRequestConfig (com.dropbox.core.DbxRequestConfig)26 DbxClientV2 (com.dropbox.core.v2.DbxClientV2)12 HttpRequestor (com.dropbox.core.http.HttpRequestor)11 Test (org.testng.annotations.Test)11 DbxAuthInfo (com.dropbox.core.DbxAuthInfo)5 DbxException (com.dropbox.core.DbxException)5 JsonReader (com.dropbox.core.json.JsonReader)5 FileMetadata (com.dropbox.core.v2.files.FileMetadata)4 Metadata (com.dropbox.core.v2.files.Metadata)3 DbxAppInfo (com.dropbox.core.DbxAppInfo)2 FullAccount (com.dropbox.core.v2.users.FullAccount)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 File (java.io.File)2 InputStream (java.io.InputStream)2 DbxAuthFinish (com.dropbox.core.DbxAuthFinish)1 DbxClient (com.dropbox.core.DbxClient)1 DbxOAuth1AccessToken (com.dropbox.core.DbxOAuth1AccessToken)1 DbxOAuth1Upgrader (com.dropbox.core.DbxOAuth1Upgrader)1 DbxWebAuth (com.dropbox.core.DbxWebAuth)1 OkHttp3Requestor (com.dropbox.core.http.OkHttp3Requestor)1