Package org.pac4j.oauth.profile.paypal
Class PayPalProfileDefinition
- java.lang.Object
-
- org.pac4j.core.profile.definition.ProfileDefinition<P>
-
- org.pac4j.core.profile.definition.CommonProfileDefinition<P>
-
- org.pac4j.oauth.profile.definition.OAuthProfileDefinition<P,com.github.scribejava.core.model.OAuth2AccessToken,C>
-
- org.pac4j.oauth.profile.definition.OAuth20ProfileDefinition<PayPalProfile,OAuth20Configuration>
-
- org.pac4j.oauth.profile.paypal.PayPalProfileDefinition
-
public class PayPalProfileDefinition extends OAuth20ProfileDefinition<PayPalProfile,OAuth20Configuration>
This class is the PayPal profile definition.- Since:
- 1.4.2
- Author:
- Jerome Leleu
-
-
Field Summary
Fields Modifier and Type Field Description static String
ADDRESS
static String
GIVEN_NAME
static String
LANGUAGE
static String
NAME
static String
ZONEINFO
-
Fields inherited from class org.pac4j.core.profile.definition.CommonProfileDefinition
DISPLAY_NAME, EMAIL, FAMILY_NAME, FIRST_NAME, GENDER, LOCALE, LOCATION, PICTURE_URL, PROFILE_URL
-
Fields inherited from class org.pac4j.core.profile.definition.ProfileDefinition
logger, newProfile
-
-
Constructor Summary
Constructors Constructor Description PayPalProfileDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PayPalProfile
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.-
Methods inherited from class org.pac4j.oauth.profile.definition.OAuthProfileDefinition
getProfileVerb, raiseProfileExtractionError, raiseProfileExtractionJsonError, raiseProfileExtractionJsonError
-
Methods inherited from class org.pac4j.core.profile.definition.CommonProfileDefinition
configurePrimaryAttributes
-
Methods inherited from class org.pac4j.core.profile.definition.ProfileDefinition
convertAndAdd, convertAndAdd, getConverters, getPrimaryAttributes, getProfileId, getSecondaryAttributes, newProfile, primary, secondary, setProfileFactory, setProfileId
-
-
-
-
Field Detail
-
ADDRESS
public static final String ADDRESS
- See Also:
- Constant Field Values
-
LANGUAGE
public static final String LANGUAGE
- See Also:
- Constant Field Values
-
ZONEINFO
public static final String ZONEINFO
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
GIVEN_NAME
public static final String GIVEN_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProfileUrl
public String getProfileUrl(com.github.scribejava.core.model.OAuth2AccessToken accessToken, OAuth20Configuration configuration)
Description copied from class:OAuthProfileDefinition
Retrieve the url of the profile of the authenticated user for the provider.- Specified by:
getProfileUrl
in classOAuthProfileDefinition<PayPalProfile,com.github.scribejava.core.model.OAuth2AccessToken,OAuth20Configuration>
- Parameters:
accessToken
- only used when constructing dynamic urls from data in the tokenconfiguration
- the current configuration- Returns:
- the url of the user profile given by the provider
-
extractUserProfile
public PayPalProfile extractUserProfile(String body)
Description copied from class:OAuthProfileDefinition
Extract the user profile from the response (JSON, XML...) of the profile url.- Specified by:
extractUserProfile
in classOAuthProfileDefinition<PayPalProfile,com.github.scribejava.core.model.OAuth2AccessToken,OAuth20Configuration>
- Parameters:
body
- the response body- Returns:
- the returned profile
-
-