Class QQProfileDefinition


  • public class QQProfileDefinition
    extends OAuthProfileDefinition
    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 java.lang.String CITY  
      static java.lang.String FIGUREURL  
      static java.lang.String FIGUREURL_1  
      static java.lang.String FIGUREURL_2  
      static java.lang.String FIGUREURL_QQ_1  
      static java.lang.String FIGUREURL_QQ_2  
      static java.lang.String MSG  
      static java.lang.String NICKNAME  
      static java.util.regex.Pattern OPENID_REGEX  
      static java.lang.String PROVINCE  
      static java.lang.String RET  
      static java.lang.String YEAR  
      • 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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String extractOpenid​(java.lang.String body)  
      protected static java.lang.String extractParameter​(java.lang.String response, java.util.regex.Pattern regexPattern, boolean required)  
      QQProfile extractUserProfile​(java.lang.String body)
      Extract the user profile from the response (JSON, XML...) of the profile url.
      java.lang.String getOpenidUrl​(com.github.scribejava.core.model.OAuth2AccessToken accessToken, OAuth20Configuration configuration)  
      java.lang.String 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.core.profile.definition.CommonProfileDefinition

        configurePrimaryAttributes
      • Methods inherited from class org.pac4j.core.profile.definition.ProfileDefinition

        convertAndAdd, convertAndAdd, getConverters, getParameter, getPrimaryAttributes, getProfileId, getSecondaryAttributes, isRestoreProfileFromTypedId, newProfile, primary, secondary, setProfileFactory, setProfileId, setRestoreProfileFromTypedId
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QQProfileDefinition

        public QQProfileDefinition()
    • Method Detail

      • getOpenidUrl

        public java.lang.String getOpenidUrl​(com.github.scribejava.core.model.OAuth2AccessToken accessToken,
                                             OAuth20Configuration configuration)
      • getProfileUrl

        public java.lang.String getProfileUrl​(com.github.scribejava.core.model.Token accessToken,
                                              OAuthConfiguration configuration)
        Description copied from class: OAuthProfileDefinition
        Retrieve the url of the profile of the authenticated user for the provider.
        Specified by:
        getProfileUrl in class OAuthProfileDefinition
        Parameters:
        accessToken - only used when constructing dynamic urls from data in the token
        configuration - the current configuration
        Returns:
        the url of the user profile given by the provider
      • extractOpenid

        public java.lang.String extractOpenid​(java.lang.String body)
      • extractParameter

        protected static java.lang.String extractParameter​(java.lang.String response,
                                                           java.util.regex.Pattern regexPattern,
                                                           boolean required)
                                                    throws com.github.scribejava.core.exceptions.OAuthException
        Throws:
        com.github.scribejava.core.exceptions.OAuthException