public abstract class BaseOAuth10Client<U extends OAuth10Profile> extends BaseOAuthClient<U,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger |
static String |
OAUTH_TOKEN |
static String |
OAUTH_VERIFIER |
static String |
REQUEST_TOKEN |
service
ATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, callbackUrlResolver
Constructor and Description |
---|
BaseOAuth10Client() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAccessTokenToProfile(U profile,
com.github.scribejava.core.model.OAuth1Token accessToken)
Add the access token to the profile (as an attribute).
|
protected com.github.scribejava.core.model.OAuth1Token |
getAccessToken(OAuthCredentials credentials)
Get the access token from OAuth credentials.
|
protected OAuthCredentials |
getOAuthCredentials(WebContext context)
Get the OAuth credentials from the web context.
|
protected String |
getRequestTokenSessionAttributeName()
Return the name of the attribute storing in session the request token.
|
protected String |
retrieveAuthorizationUrl(WebContext context)
Retrieve the authorization url to redirect to the OAuth provider.
|
protected void |
signRequest(com.github.scribejava.core.model.OAuth1Token token,
com.github.scribejava.core.model.OAuthRequest request) |
buildOAuthConfig, createOAuthRequest, extractUserProfile, getApi, getConnectTimeout, getKey, getOAuthScope, getProfileUrl, 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, toString
addAuthorizationGenerator, addAuthorizationGenerators, getAuthorizationGenerators, getName, getUserProfile, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setName
init, reinit
protected static final org.slf4j.Logger logger
public static final String OAUTH_TOKEN
public static final String OAUTH_VERIFIER
public static final String REQUEST_TOKEN
protected String getRequestTokenSessionAttributeName()
protected String retrieveAuthorizationUrl(WebContext context) throws HttpAction
BaseOAuthClient
retrieveAuthorizationUrl
in class BaseOAuthClient<U extends OAuth10Profile,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>
context
- the web contextHttpAction
- whether an additional HTTP action is requiredprotected OAuthCredentials getOAuthCredentials(WebContext context) throws HttpAction
BaseOAuthClient
getOAuthCredentials
in class BaseOAuthClient<U extends OAuth10Profile,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>
context
- the web contextHttpAction
- whether an additional HTTP action is requiredprotected com.github.scribejava.core.model.OAuth1Token getAccessToken(OAuthCredentials credentials) throws HttpAction
BaseOAuthClient
getAccessToken
in class BaseOAuthClient<U extends OAuth10Profile,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>
credentials
- credentialsHttpAction
- whether an additional HTTP action is requiredprotected void addAccessTokenToProfile(U profile, com.github.scribejava.core.model.OAuth1Token accessToken)
BaseOAuthClient
addAccessTokenToProfile
in class BaseOAuthClient<U extends OAuth10Profile,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>
profile
- the user profileaccessToken
- the access tokenprotected void signRequest(com.github.scribejava.core.model.OAuth1Token token, com.github.scribejava.core.model.OAuthRequest request)
signRequest
in class BaseOAuthClient<U extends OAuth10Profile,com.github.scribejava.core.oauth.OAuth10aService,com.github.scribejava.core.model.OAuth1Token>
Copyright © 2016. All rights reserved.