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_TOKEN
service
ATTEMPTED_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, signRequest
buildOAuthConfig, createOAuthRequest, getConnectTimeout, getKey, getOAuthScope, getReadTimeout, getResponseType, getSecret, hasBeenCancelled, hasOAuthGrantType, internalInit, isTokenAsHeader, retrieveCredentials, retrieveRedirectAction, retrieveUserProfile, retrieveUserProfileFromToken, sendRequestForData, setConnectTimeout, setKey, setReadTimeout, setResponseType, setSecret, setTokenAsHeader
computeFinalCallbackUrl, getAjaxRequestResolver, getCallbackUrl, getCallbackUrlResolver, getCredentials, getRedirectAction, getStateParameter, isIncludeClientNameInCallbackUrl, redirect, setAjaxRequestResolver, setCallbackUrl, setCallbackUrlResolver, setIncludeClientNameInCallbackUrl
addAuthorizationGenerator, getAuthorizationGenerators, getName, getUserProfile, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setName, toString
init, reinit
protected com.github.scribejava.core.builder.api.BaseApi<com.github.scribejava.core.oauth.OAuth10aService> getApi()
BaseOAuthClient
getApi
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)
BaseOAuthClient
getProfileUrl
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
BaseOAuthClient
getOAuthCredentials
in class BaseOAuth10Client<DropBoxProfile>
context
- the web contextHttpAction
- whether an additional HTTP action is requiredprotected DropBoxProfile extractUserProfile(String body) throws HttpAction
BaseOAuthClient
extractUserProfile
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.