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
logger, OAUTH_TOKEN, OAUTH_VERIFIER, REQUEST_TOKENserviceATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, callbackUrlResolver| 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 com.github.scribejava.core.builder.api.BaseApi<com.github.scribejava.core.oauth.OAuth10aService> |
getApi()
Define the OAuth API for this client.
|
protected OAuthCredentials |
getOAuthCredentials(WebContext context)
Get the OAuth credentials from the web context.
|
protected String |
getProfileUrl(com.github.scribejava.core.model.OAuth1Token token)
Retrieve the url of the profile of the authenticated user for the provider.
|
addAccessTokenToProfile, getAccessToken, getRequestTokenSessionAttributeName, retrieveAuthorizationUrl, signRequestbuildOAuthConfig, createOAuthRequest, getConnectTimeout, getKey, getOAuthScope, getReadTimeout, getResponseType, getSecret, hasBeenCancelled, hasOAuthGrantType, internalInit, isTokenAsHeader, retrieveCredentials, retrieveRedirectAction, retrieveUserProfile, retrieveUserProfileFromToken, sendRequestForData, setConnectTimeout, setKey, setReadTimeout, setResponseType, setSecret, setTokenAsHeadercomputeFinalCallbackUrl, getAjaxRequestResolver, getCallbackUrl, getCallbackUrlResolver, getCredentials, getRedirectAction, getStateParameter, isIncludeClientNameInCallbackUrl, redirect, setAjaxRequestResolver, setCallbackUrl, setCallbackUrlResolver, setIncludeClientNameInCallbackUrladdAuthorizationGenerator, getAuthorizationGenerators, getName, getUserProfile, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setName, toStringinit, reinitprotected com.github.scribejava.core.builder.api.BaseApi<com.github.scribejava.core.oauth.OAuth10aService> getApi()
BaseOAuthClientgetApi in class BaseOAuthClient<DropBoxProfile,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>protected String getProfileUrl(com.github.scribejava.core.model.OAuth1Token token)
BaseOAuthClientgetProfileUrl in class BaseOAuthClient<DropBoxProfile,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>token - only used when constructing dynamic urls from data in the tokenprotected OAuthCredentials getOAuthCredentials(WebContext context) throws HttpAction
BaseOAuthClientgetOAuthCredentials in class BaseOAuth10Client<DropBoxProfile>context - the web contextHttpAction - whether an additional HTTP action is requiredprotected DropBoxProfile extractUserProfile(String body) throws HttpAction
BaseOAuthClientextractUserProfile in class BaseOAuthClient<DropBoxProfile,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>body - the response bodyHttpAction - whether an additional HTTP action is requiredCopyright © 2016. All rights reserved.