public class DropBoxClient extends BaseOAuth10Client<DropBoxProfile>
This class is the OAuth client to authenticate users in DropBox.
It returns a DropBoxProfile.
More information at https://www.dropbox.com/developers/reference/api#account-info
DropBoxProfilelogger, OAUTH_TOKEN, OAUTH_VERIFIER, REQUEST_TOKENconnectTimeout, key, proxyHost, proxyPort, readTimeout, secret, service, tokenAsHeaderATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, callbackUrlResolver, NEEDS_CLIENT_REDIRECTION_PARAMETER| Constructor and Description |
|---|
DropBoxClient() |
DropBoxClient(String key,
String secret) |
| Modifier and Type | Method and Description |
|---|---|
protected DropBoxProfile |
extractUserProfile(String body)
Extract the user profile from the response (JSON, XML...) of the profile url.
|
protected OAuthCredentials |
getOAuthCredentials(WebContext context)
Get the OAuth credentials from the web context.
|
protected String |
getProfileUrl(org.scribe.model.Token accessToken)
Retrieve the url of the profile of the authenticated user for the provider.
|
protected boolean |
hasBeenCancelled(WebContext context)
Return if the authentication has been cancelled.
|
protected void |
internalInit(WebContext context)
Internal initialization of the object.
|
protected DropBoxClient |
newClient()
Create a new instance of the client.
|
addAccessTokenToProfile, getAccessToken, getRequestTokenSessionAttributeName, isDirectRedirection, retrieveAuthorizationUrlclone, createProxyRequest, getClientType, getConnectTimeout, getKey, getProxyHost, getProxyPort, getReadTimeout, getSecret, getUserProfile, isTokenAsHeader, retrieveCredentials, retrieveRedirectAction, retrieveUserProfile, retrieveUserProfileFromToken, sendRequestForData, sendRequestForData, setConnectTimeout, setKey, setProxyHost, setProxyPort, setReadTimeout, setSecret, setTokenAsHeadercomputeFinalCallbackUrl, getAjaxRequestResolver, getCallbackUrl, getCallbackUrlResolver, getCredentials, getRedirectAction, getRedirectionUrl, getStateParameter, isIncludeClientNameInCallbackUrl, redirect, setAjaxRequestResolver, setCallbackUrl, setCallbackUrlResolver, setIncludeClientNameInCallbackUrladdAuthorizationGenerator, getAuthorizationGenerators, getName, getUserProfile, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setName, toStringinit, reinitprotected DropBoxClient newClient()
BaseClientnewClient in class BaseClient<OAuthCredentials,DropBoxProfile>protected void internalInit(WebContext context)
InitializableWebObjectinternalInit in class BaseOAuthClient<DropBoxProfile>context - the web contextprotected String getProfileUrl(org.scribe.model.Token accessToken)
BaseOAuthClientgetProfileUrl in class BaseOAuthClient<DropBoxProfile>accessToken - only used when constructing dynamic urls from data in the tokenprotected OAuthCredentials getOAuthCredentials(WebContext context)
getOAuthCredentials in class BaseOAuth10Client<DropBoxProfile>context - the web contextprotected DropBoxProfile extractUserProfile(String body)
BaseOAuthClientextractUserProfile in class BaseOAuthClient<DropBoxProfile>body - the response bodyprotected boolean hasBeenCancelled(WebContext context)
BaseOAuthClienthasBeenCancelled in class BaseOAuthClient<DropBoxProfile>context - the web context.Copyright © 2016. All rights reserved.