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).
It returns a TwitterProfile
.
More information at https://dev.twitter.com/docs/api/1/get/account/verify_credentials
configuration
ATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, urlResolver
logger
Constructor and Description |
---|
TwitterClient() |
TwitterClient(String key,
String secret) |
Modifier and Type | Method and Description |
---|---|
protected void |
clientInit(WebContext context)
Initialize the client.
|
protected com.github.scribejava.core.builder.api.BaseApi<com.github.scribejava.core.oauth.OAuth10aService> |
getApi() |
boolean |
isAlwaysConfirmAuthorization() |
void |
setAlwaysConfirmAuthorization(boolean alwaysConfirmAuthorization) |
getConfiguration, getKey, getSecret, setConfiguration, setKey, setSecret, toString
computeFinalCallbackUrl, defaultLogoutActionBuilder, defaultRedirectActionBuilder, getAjaxRequestResolver, getCallbackUrl, getCallbackUrlResolver, getCredentials, getLogoutAction, getLogoutActionBuilder, getRedirectAction, getRedirectActionBuilder, getUrlResolver, internalInit, isIncludeClientNameInCallbackUrl, redirect, setAjaxRequestResolver, setCallbackUrl, setCallbackUrlResolver, setIncludeClientNameInCallbackUrl, setLogoutActionBuilder, setRedirectActionBuilder, setUrlResolver
addAuthorizationGenerator, addAuthorizationGenerators, defaultAuthenticator, defaultCredentialsExtractor, defaultProfileCreator, getAuthenticator, getAuthorizationGenerators, getCredentialsExtractor, getName, getProfileCreator, getUserProfile, notifySessionRenewal, retrieveCredentials, retrieveUserProfile, setAuthenticator, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setCredentialsExtractor, setName, setProfileCreator
init, reinit
protected void clientInit(WebContext context)
IndirectClient
clientInit
in class OAuth10Client<TwitterProfile>
context
- the web contextprotected com.github.scribejava.core.builder.api.BaseApi<com.github.scribejava.core.oauth.OAuth10aService> getApi()
public boolean isAlwaysConfirmAuthorization()
public void setAlwaysConfirmAuthorization(boolean alwaysConfirmAuthorization)
Copyright © 2017. All rights reserved.