public class WordPressProfileDefinition extends OAuth20ProfileDefinition<WordPressProfile>
Modifier and Type | Field and Description |
---|---|
static String |
AVATAR_URL |
static String |
LINKS |
static String |
PRIMARY_BLOG |
static String |
PROFILE_URL |
DISPLAY_NAME, EMAIL, FAMILY_NAME, FIRST_NAME, GENDER, LOCALE, LOCATION, PICTURE_URL
logger, newProfile
Constructor and Description |
---|
WordPressProfileDefinition() |
Modifier and Type | Method and Description |
---|---|
WordPressProfile |
extractUserProfile(String body)
Extract the user profile from the response (JSON, XML...) of the profile url.
|
String |
getProfileUrl(com.github.scribejava.core.model.OAuth2AccessToken accessToken,
OAuth20Configuration configuration)
Retrieve the url of the profile of the authenticated user for the provider.
|
getProfileVerb
convertAndAdd, convertAndAdd, convertAndAdd, convertAndAdd, getConverters, getPrimaryAttributes, getSecondaryAttributes, newProfile, primary, secondary, setProfileFactory
public static final String PRIMARY_BLOG
public static final String AVATAR_URL
public static final String PROFILE_URL
public static final String LINKS
public String getProfileUrl(com.github.scribejava.core.model.OAuth2AccessToken accessToken, OAuth20Configuration configuration)
OAuthProfileDefinition
getProfileUrl
in class OAuthProfileDefinition<WordPressProfile,com.github.scribejava.core.model.OAuth2AccessToken,OAuth20Configuration>
accessToken
- only used when constructing dynamic urls from data in the tokenconfiguration
- the current configurationpublic WordPressProfile extractUserProfile(String body) throws HttpAction
OAuthProfileDefinition
extractUserProfile
in class OAuthProfileDefinition<WordPressProfile,com.github.scribejava.core.model.OAuth2AccessToken,OAuth20Configuration>
body
- the response bodyHttpAction
- whether an extra HTTP action is requiredCopyright © 2018. All rights reserved.