Package org.pac4j.oauth.profile.qq
Class QQProfileDefinition
- 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<QQProfile,OAuth20Configuration>
-
- org.pac4j.oauth.profile.qq.QQProfileDefinition
-
public class QQProfileDefinition extends OAuth20ProfileDefinition<QQProfile,OAuth20Configuration>
This class defines the attributes of the Tencent QQ Connect profile.More info at: get_user_info
- Since:
- 3.1.0
- Author:
- zhangzhenli
-
-
Field Summary
Fields Modifier and Type Field Description static StringCITYstatic StringFIGUREURLstatic StringFIGUREURL_1static StringFIGUREURL_2static StringFIGUREURL_QQ_1static StringFIGUREURL_QQ_2static StringMSGstatic StringNICKNAMEstatic PatternOPENID_REGEXstatic StringPROVINCEstatic StringRETstatic StringYEAR-
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 QQProfileDefinition()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringextractOpenid(String body)protected static StringextractParameter(String response, Pattern regexPattern, boolean required)QQProfileextractUserProfile(String body)Extract the user profile from the response (JSON, XML...) of the profile url.StringgetOpenidUrl(com.github.scribejava.core.model.OAuth2AccessToken accessToken, OAuth20Configuration configuration)StringgetProfileUrl(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
-
OPENID_REGEX
public static final Pattern OPENID_REGEX
-
RET
public static final String RET
- See Also:
- Constant Field Values
-
MSG
public static final String MSG
- See Also:
- Constant Field Values
-
NICKNAME
public static final String NICKNAME
- See Also:
- Constant Field Values
-
PROVINCE
public static final String PROVINCE
- See Also:
- Constant Field Values
-
CITY
public static final String CITY
- See Also:
- Constant Field Values
-
YEAR
public static final String YEAR
- See Also:
- Constant Field Values
-
FIGUREURL
public static final String FIGUREURL
- See Also:
- Constant Field Values
-
FIGUREURL_1
public static final String FIGUREURL_1
- See Also:
- Constant Field Values
-
FIGUREURL_2
public static final String FIGUREURL_2
- See Also:
- Constant Field Values
-
FIGUREURL_QQ_1
public static final String FIGUREURL_QQ_1
- See Also:
- Constant Field Values
-
FIGUREURL_QQ_2
public static final String FIGUREURL_QQ_2
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOpenidUrl
public String getOpenidUrl(com.github.scribejava.core.model.OAuth2AccessToken accessToken, OAuth20Configuration configuration)
-
getProfileUrl
public String getProfileUrl(com.github.scribejava.core.model.OAuth2AccessToken accessToken, OAuth20Configuration configuration)
Description copied from class:OAuthProfileDefinitionRetrieve the url of the profile of the authenticated user for the provider.- Specified by:
getProfileUrlin classOAuthProfileDefinition<QQProfile,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 QQProfile extractUserProfile(String body)
Description copied from class:OAuthProfileDefinitionExtract the user profile from the response (JSON, XML...) of the profile url.- Specified by:
extractUserProfilein classOAuthProfileDefinition<QQProfile,com.github.scribejava.core.model.OAuth2AccessToken,OAuth20Configuration>- Parameters:
body- the response body- Returns:
- the returned profile
-
-