public class YahooClient extends BaseOAuth10Client<YahooProfile>
This class is the OAuth client to authenticate users in Yahoo.
It returns a YahooProfile
.
More information at http://developer.yahoo.com/social/rest_api_guide/extended-profile-resource.html
logger, OAUTH_TOKEN, OAUTH_VERIFIER, REQUEST_TOKEN
service
ATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, callbackUrlResolver
Constructor and Description |
---|
YahooClient() |
YahooClient(String key,
String secret) |
Modifier and Type | Method and Description |
---|---|
protected YahooProfile |
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 String |
getProfileUrl(com.github.scribejava.core.model.OAuth1Token accessToken)
Retrieve the url of the profile of the authenticated user for the provider.
|
protected YahooProfile |
retrieveUserProfileFromToken(com.github.scribejava.core.model.OAuth1Token accessToken)
Retrieve the user profile from the access token.
|
addAccessTokenToProfile, getAccessToken, getOAuthCredentials, getRequestTokenSessionAttributeName, retrieveAuthorizationUrl, signRequest
buildOAuthConfig, createOAuthRequest, getConnectTimeout, getKey, getOAuthScope, getReadTimeout, getResponseType, getSecret, hasBeenCancelled, hasOAuthGrantType, internalInit, isTokenAsHeader, retrieveCredentials, retrieveRedirectAction, retrieveUserProfile, 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<YahooProfile,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>
protected String getProfileUrl(com.github.scribejava.core.model.OAuth1Token accessToken)
BaseOAuthClient
getProfileUrl
in class BaseOAuthClient<YahooProfile,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>
accessToken
- only used when constructing dynamic urls from data in the tokenprotected YahooProfile retrieveUserProfileFromToken(com.github.scribejava.core.model.OAuth1Token accessToken) throws HttpAction
BaseOAuthClient
retrieveUserProfileFromToken
in class BaseOAuthClient<YahooProfile,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>
accessToken
- the access tokenHttpAction
- whether an additional HTTP action is requiredprotected YahooProfile extractUserProfile(String body) throws HttpAction
BaseOAuthClient
extractUserProfile
in class BaseOAuthClient<YahooProfile,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.