public abstract class BaseOAuth20Client<U extends OAuth20Profile> extends BaseOAuthClient<U,com.github.scribejava.core.oauth.OAuth20Service,com.github.scribejava.core.model.OAuth2AccessToken>
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger |
static String |
OAUTH_CODE |
service
ATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, callbackUrlResolver
Constructor and Description |
---|
BaseOAuth20Client() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAccessTokenToProfile(U profile,
com.github.scribejava.core.model.OAuth2AccessToken accessToken)
Add the access token to the profile (as an attribute).
|
protected com.github.scribejava.core.model.OAuth2AccessToken |
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 |
retrieveAuthorizationUrl(WebContext context)
Retrieve the authorization url to redirect to the OAuth provider.
|
protected void |
signRequest(com.github.scribejava.core.model.OAuth2AccessToken accessToken,
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
addAuthorizationGenerator, getAuthorizationGenerators, getName, getUserProfile, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setName, toString
init, reinit
protected static final org.slf4j.Logger logger
public static final String OAUTH_CODE
protected String retrieveAuthorizationUrl(WebContext context) throws HttpAction
BaseOAuthClient
retrieveAuthorizationUrl
in class BaseOAuthClient<U extends OAuth20Profile,com.github.scribejava.core.oauth.OAuth20Service,com.github.scribejava.core.model.OAuth2AccessToken>
context
- the web contextHttpAction
- whether an additional HTTP action is requiredprotected OAuthCredentials getOAuthCredentials(WebContext context) throws HttpAction
BaseOAuthClient
getOAuthCredentials
in class BaseOAuthClient<U extends OAuth20Profile,com.github.scribejava.core.oauth.OAuth20Service,com.github.scribejava.core.model.OAuth2AccessToken>
context
- the web contextHttpAction
- whether an additional HTTP action is requiredprotected com.github.scribejava.core.model.OAuth2AccessToken getAccessToken(OAuthCredentials credentials) throws HttpAction
BaseOAuthClient
getAccessToken
in class BaseOAuthClient<U extends OAuth20Profile,com.github.scribejava.core.oauth.OAuth20Service,com.github.scribejava.core.model.OAuth2AccessToken>
credentials
- credentialsHttpAction
- whether an additional HTTP action is requiredprotected void addAccessTokenToProfile(U profile, com.github.scribejava.core.model.OAuth2AccessToken accessToken)
BaseOAuthClient
addAccessTokenToProfile
in class BaseOAuthClient<U extends OAuth20Profile,com.github.scribejava.core.oauth.OAuth20Service,com.github.scribejava.core.model.OAuth2AccessToken>
profile
- the user profileaccessToken
- the access tokenprotected void signRequest(com.github.scribejava.core.model.OAuth2AccessToken accessToken, com.github.scribejava.core.model.OAuthRequest request)
signRequest
in class BaseOAuthClient<U extends OAuth20Profile,com.github.scribejava.core.oauth.OAuth20Service,com.github.scribejava.core.model.OAuth2AccessToken>
Copyright © 2016. All rights reserved.