public class OAuth10ProfileCreator<U extends OAuth10Profile> extends Object
Modifier and Type | Field and Description |
---|---|
protected IndirectClient |
client |
protected O |
configuration |
protected org.slf4j.Logger |
logger |
protected static com.fasterxml.jackson.databind.ObjectMapper |
mapper |
Constructor and Description |
---|
OAuth10ProfileCreator(OAuth10Configuration configuration,
IndirectClient client) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAccessTokenToProfile(U profile,
com.github.scribejava.core.model.OAuth1AccessToken accessToken)
Add the access token to the profile (as an attribute).
|
U |
create(C credentials,
WebContext context)
Create a profile from a credentials.
|
protected com.github.scribejava.core.model.OAuthRequest |
createOAuthRequest(String url,
com.github.scribejava.core.model.Verb verb)
Create an OAuth request.
|
protected com.github.scribejava.core.model.OAuth1AccessToken |
getAccessToken(OAuth10Credentials credentials)
Get the access token from OAuth credentials.
|
protected U |
retrieveUserProfileFromToken(WebContext context,
T accessToken)
Retrieve the user profile from the access token.
|
protected String |
sendRequestForData(S service,
T accessToken,
String dataUrl,
com.github.scribejava.core.model.Verb verb)
Make a request to get the data of the authenticated user for the provider.
|
protected void |
signRequest(com.github.scribejava.core.oauth.OAuth10aService service,
com.github.scribejava.core.model.OAuth1AccessToken token,
com.github.scribejava.core.model.OAuthRequest request)
Sign the request.
|
protected final org.slf4j.Logger logger
protected static final com.fasterxml.jackson.databind.ObjectMapper mapper
protected O extends OAuthConfiguration<S,T> configuration
protected IndirectClient client
public OAuth10ProfileCreator(OAuth10Configuration configuration, IndirectClient client)
protected com.github.scribejava.core.model.OAuth1AccessToken getAccessToken(OAuth10Credentials credentials)
credentials
- credentialsprotected void addAccessTokenToProfile(U profile, com.github.scribejava.core.model.OAuth1AccessToken accessToken)
profile
- the user profileaccessToken
- the access tokenprotected void signRequest(com.github.scribejava.core.oauth.OAuth10aService service, com.github.scribejava.core.model.OAuth1AccessToken token, com.github.scribejava.core.model.OAuthRequest request)
service
- the servicetoken
- the tokenrequest
- the requestpublic U create(C credentials, WebContext context)
ProfileCreator
create
in interface ProfileCreator<C extends OAuthCredentials,U extends CommonProfile>
credentials
- the given credentialscontext
- the web contextprotected U retrieveUserProfileFromToken(WebContext context, T accessToken)
context
- the web contextaccessToken
- the access tokenprotected String sendRequestForData(S service, T accessToken, String dataUrl, com.github.scribejava.core.model.Verb verb)
service
- the OAuth serviceaccessToken
- the access tokendataUrl
- url of the dataverb
- method used to request dataprotected com.github.scribejava.core.model.OAuthRequest createOAuthRequest(String url, com.github.scribejava.core.model.Verb verb)
url
- the url to callverb
- method used to create the requestCopyright © 2019. All rights reserved.