Package org.pac4j.oauth.profile.yahoo
Class YahooProfileDefinition
java.lang.Object
org.pac4j.core.profile.definition.ProfileDefinition
org.pac4j.core.profile.definition.CommonProfileDefinition
org.pac4j.oauth.profile.definition.OAuthProfileDefinition
org.pac4j.oauth.profile.yahoo.YahooProfileDefinition
This class is the Yahoo profile definition.
- Since:
- 1.1.0
- Author:
- Jerome Leleu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstantABOUT_ME="aboutMe"static final StringConstantADDRESSES="addresses"static final StringConstantAGE_CATEGORY="ageCategory"static final StringConstantBIRTH_YEAR="birthYear"static final StringConstantBIRTHDATE="birthdate"static final StringConstantCREATED="created"static final StringConstantDISCLOSURES="disclosures"static final StringConstantDISPLAY_AGE="displayAge"static final StringConstantEMAILS="emails"static final StringConstantFAMILY_NAME="familyName"static final StringConstantGIVEN_NAME="givenName"static final StringConstantIMAGE="image"static final StringConstantINTERESTS="interests"static final StringConstantIS_CONNECTED="isConnected"static final StringConstantLANG="lang"static final StringConstantMEMBER_SINCE="memberSince"static final StringConstantNICKNAME="nickname"static final StringConstantPROFILE_URL="profileUrl"static final StringConstantTIME_ZONE="timeZone"static final StringConstantUPDATED="updated"static final StringConstantURI="uri"Fields inherited from class org.pac4j.core.profile.definition.CommonProfileDefinition
DISPLAY_NAME, EMAIL, FIRST_NAME, GENDER, LOCALE, LOCATION, PICTURE_URLFields inherited from class org.pac4j.core.profile.definition.ProfileDefinition
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractUserProfile(String body) Extract the user profile from the response (JSON, XML...) of the profile url.getProfileUrl(com.github.scribejava.core.model.Token accessToken, OAuthConfiguration 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, raiseProfileExtractionJsonErrorMethods inherited from class org.pac4j.core.profile.definition.CommonProfileDefinition
configurePrimaryAttributesMethods inherited from class org.pac4j.core.profile.definition.ProfileDefinition
convertAndAdd, convertAndAdd, getConverters, getLogger, getParameter, getPrimaryAttributes, getProfileFactory, getProfileId, getSecondaryAttributes, isRestoreProfileFromTypedId, newProfile, primary, secondary, setProfileFactory, setProfileId, setRestoreProfileFromTypedId
-
Field Details
-
ABOUT_ME
ConstantABOUT_ME="aboutMe"- See Also:
-
AGE_CATEGORY
ConstantAGE_CATEGORY="ageCategory"- See Also:
-
ADDRESSES
ConstantADDRESSES="addresses"- See Also:
-
BIRTH_YEAR
ConstantBIRTH_YEAR="birthYear"- See Also:
-
BIRTHDATE
ConstantBIRTHDATE="birthdate"- See Also:
-
CREATED
ConstantCREATED="created"- See Also:
-
DISPLAY_AGE
ConstantDISPLAY_AGE="displayAge"- See Also:
-
DISCLOSURES
ConstantDISCLOSURES="disclosures"- See Also:
-
EMAILS
ConstantEMAILS="emails"- See Also:
-
FAMILY_NAME
ConstantFAMILY_NAME="familyName"- See Also:
-
GIVEN_NAME
ConstantGIVEN_NAME="givenName"- See Also:
-
IMAGE
ConstantIMAGE="image"- See Also:
-
INTERESTS
ConstantINTERESTS="interests"- See Also:
-
IS_CONNECTED
ConstantIS_CONNECTED="isConnected"- See Also:
-
LANG
ConstantLANG="lang"- See Also:
-
MEMBER_SINCE
ConstantMEMBER_SINCE="memberSince"- See Also:
-
NICKNAME
ConstantNICKNAME="nickname"- See Also:
-
PROFILE_URL
ConstantPROFILE_URL="profileUrl"- See Also:
-
TIME_ZONE
ConstantTIME_ZONE="timeZone"- See Also:
-
UPDATED
ConstantUPDATED="updated"- See Also:
-
URI
ConstantURI="uri"- See Also:
-
-
Constructor Details
-
YahooProfileDefinition
public YahooProfileDefinition()Constructor for YahooProfileDefinition.
-
-
Method Details
-
getProfileUrl
public String getProfileUrl(com.github.scribejava.core.model.Token accessToken, OAuthConfiguration configuration) Retrieve the url of the profile of the authenticated user for the provider.- Specified by:
getProfileUrlin classOAuthProfileDefinition- 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
Extract the user profile from the response (JSON, XML...) of the profile url.- Specified by:
extractUserProfilein classOAuthProfileDefinition- Parameters:
body- the response body- Returns:
- the returned profile
-