public class Google2ProfileDefinition extends OAuth20ProfileDefinition<Google2Profile>
Modifier and Type | Field and Description |
---|---|
static String |
BIRTHDAY |
static String |
DISPLAY_NAME |
static String |
EMAILS |
static String |
FAMILY_NAME |
static String |
GIVEN_NAME |
static String |
LANGUAGE |
static String |
PICTURE |
static String |
URL |
EMAIL, FIRST_NAME, GENDER, LOCALE, LOCATION, PICTURE_URL, PROFILE_URL
logger, newProfile
Constructor and Description |
---|
Google2ProfileDefinition() |
Modifier and Type | Method and Description |
---|---|
Google2Profile |
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, getConverters, getPrimaryAttributes, getSecondaryAttributes, newProfile, primary, secondary, setProfileFactory
public static final String DISPLAY_NAME
public static final String GIVEN_NAME
public static final String FAMILY_NAME
public static final String URL
public static final String PICTURE
public static final String LANGUAGE
public static final String BIRTHDAY
public static final String EMAILS
public String getProfileUrl(com.github.scribejava.core.model.OAuth2AccessToken accessToken, OAuth20Configuration configuration)
OAuthProfileDefinition
getProfileUrl
in class OAuthProfileDefinition<Google2Profile,com.github.scribejava.core.model.OAuth2AccessToken,OAuth20Configuration>
accessToken
- only used when constructing dynamic urls from data in the tokenconfiguration
- the current configurationpublic Google2Profile extractUserProfile(String body) throws HttpAction
OAuthProfileDefinition
extractUserProfile
in class OAuthProfileDefinition<Google2Profile,com.github.scribejava.core.model.OAuth2AccessToken,OAuth20Configuration>
body
- the response bodyHttpAction
- whether an extra HTTP action is requiredCopyright © 2017. All rights reserved.