public class FoursquareProfileCreator extends OAuth20ProfileCreator<FoursquareProfile>
| 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 |
|---|
FoursquareProfileCreator(OAuth20Configuration configuration,
IndirectClient client) |
| Modifier and Type | Method and Description |
|---|---|
U |
create(C credentials,
WebContext context) |
protected com.github.scribejava.core.model.OAuthRequest |
createOAuthRequest(java.lang.String url,
com.github.scribejava.core.model.Verb verb)
Create an OAuth request.
|
protected U |
retrieveUserProfileFromToken(WebContext context,
T accessToken)
Retrieve the user profile from the access token.
|
protected java.lang.String |
sendRequestForData(S service,
T accessToken,
java.lang.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.OAuth20Service service,
com.github.scribejava.core.model.OAuth2AccessToken accessToken,
com.github.scribejava.core.model.OAuthRequest request)
Sign the request.
|
addAccessTokenToProfile, getAccessTokenprotected 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 FoursquareProfileCreator(OAuth20Configuration configuration, IndirectClient client)
protected void signRequest(com.github.scribejava.core.oauth.OAuth20Service service,
com.github.scribejava.core.model.OAuth2AccessToken accessToken,
com.github.scribejava.core.model.OAuthRequest request)
signRequest in class OAuth20ProfileCreator<FoursquareProfile>service - the serviceaccessToken - the tokenrequest - the requestpublic U create(C credentials,
WebContext context)
create in interface ProfileCreator<C extends OAuthCredentials,U extends CommonProfile>protected U retrieveUserProfileFromToken(WebContext context, T accessToken)
context - the web contextaccessToken - the access tokenprotected java.lang.String sendRequestForData(S service,
T accessToken,
java.lang.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(java.lang.String url,
com.github.scribejava.core.model.Verb verb)
url - the url to callverb - method used to create the requestCopyright © 2018. All Rights Reserved.