public class TwitterClient extends OAuth10Client<TwitterProfile>
This class is the OAuth client to authenticate users in Twitter.
You can define if a screen should always been displayed for authorization confirmation by using the
setAlwaysConfirmAuthorization(boolean) method (false by default).
If your twitter oauth app allows requests for email addresses you can enable requesting an email
address by using the setIncludeEmail(boolean) method (false by default).
It returns a TwitterProfile.
More information at https://dev.twitter.com/docs/api/1/get/account/verify_credentials
configurationATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, callbackUrlResolver, urlResolverlogger| Constructor and Description |
|---|
TwitterClient() |
TwitterClient(java.lang.String key,
java.lang.String secret) |
TwitterClient(java.lang.String key,
java.lang.String secret,
boolean includeEmail) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clientInit() |
protected com.github.scribejava.core.builder.api.BaseApi<com.github.scribejava.core.oauth.OAuth10aService> |
getApi() |
boolean |
isAlwaysConfirmAuthorization() |
boolean |
isIncludeEmail() |
void |
setAlwaysConfirmAuthorization(boolean alwaysConfirmAuthorization) |
void |
setIncludeEmail(boolean includeEmail) |
getConfiguration, getKey, getSecret, setConfiguration, setKey, setSecret, toStringcomputeFinalCallbackUrl, defaultLogoutActionBuilder, defaultRedirectActionBuilder, getAjaxRequestResolver, getCallbackUrl, getCallbackUrlResolver, getCredentials, getLogoutAction, getLogoutActionBuilder, getRedirectAction, getRedirectActionBuilder, getUrlResolver, internalInit, redirect, setAjaxRequestResolver, setCallbackUrl, setCallbackUrlResolver, setLogoutActionBuilder, setRedirectActionBuilder, setUrlResolveraddAuthorizationGenerator, addAuthorizationGenerators, defaultAuthenticator, defaultCredentialsExtractor, defaultProfileCreator, getAuthenticator, getAuthorizationGenerators, getCredentialsExtractor, getCustomProperties, getName, getProfileCreator, getUserProfile, notifySessionRenewal, retrieveCredentials, retrieveUserProfile, setAuthenticator, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setCredentialsExtractor, setCustomProperties, setName, setProfileCreatorinitpublic TwitterClient()
public TwitterClient(java.lang.String key,
java.lang.String secret)
public TwitterClient(java.lang.String key,
java.lang.String secret,
boolean includeEmail)
protected void clientInit()
clientInit in class OAuth10Client<TwitterProfile>protected com.github.scribejava.core.builder.api.BaseApi<com.github.scribejava.core.oauth.OAuth10aService> getApi()
public boolean isAlwaysConfirmAuthorization()
public void setAlwaysConfirmAuthorization(boolean alwaysConfirmAuthorization)
public boolean isIncludeEmail()
public void setIncludeEmail(boolean includeEmail)
Copyright © 2018. All Rights Reserved.