Package org.pac4j.oauth.profile.weibo
Class WeiboProfileDefinition
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.weibo.WeiboProfileDefinition
This class is the Sina Weibo profile definition (using OAuth 2.0 protocol).
More info at: users/show
- Since:
- 3.1.0
- Author:
- zhangzhenli
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringboolean Whether to allow everyone to send me a private message, true: yes, false: nostatic final Stringboolean Whether to allow everyone to comment on my Weibo, true: yes, false: nostatic final Stringstring User avatar address (HD), HD avatar originalstatic final Stringstring User avatar address (larger image), 180 × 180 pixelsstatic final Stringint User's mutual powder countstatic final Stringint User's city IDstatic final Stringurl User cover image urlstatic final Stringstring User creation (registration) timestatic final Stringstring User personal descriptionstatic final Stringstring User's personalized domain namestatic final Stringint Number of favoritesstatic final Stringboolean Whether the user is concerned about the currently logged in user, true: yes, false: nostatic final Stringint Number of fansstatic final Stringboolean Not supported yetstatic final Stringint Number of followersstatic final Stringstring Gender, m: male, f: female, n: unknownstatic final Stringboolean Whether to allow identification of the user's geographic location, true: yes, false: nostatic final Stringint64 User UIDstatic final Stringstring String-type user UIDstatic final Stringstring User's current language version, zh-cn: Simplified Chinese, zh-tw: Traditional Chinese, en: Englishstatic final Stringstring User locationstatic final Stringstring Friendly display namestatic final Stringint User's online status, 0: not online, 1: onlinestatic final Stringurl User avatar address (middle), 50×50 pixelsstatic final Stringurl User's Weibo unified URL addressstatic final Stringint User's provincial IDstatic final Stringstring User note information, this field is only returned when querying user relationshipsstatic final Stringstring User's Nicknamestatic final Stringobject User's recent Weibo information fieldstatic final Stringint Weibo numberstatic final Stringurl User blog addressstatic final Stringboolean Whether it is a Weibo authenticated user, that is, a V-user, true: yes, false: nostatic final Stringstring Reason for certificationstatic final Stringint Not supported yetstatic final Stringstring User's weihao numberFields inherited from class org.pac4j.core.profile.definition.CommonProfileDefinition
DISPLAY_NAME, EMAIL, FAMILY_NAME, FIRST_NAME, LOCALE, 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
-
ID
int64 User UID- See Also:
-
IDSTR
string String-type user UID- See Also:
-
SCREEN_NAME
string User's Nickname- See Also:
-
NAME
string Friendly display name- See Also:
-
PROVINCE
int User's provincial ID- See Also:
-
CITY
int User's city ID- See Also:
-
LOCATION
string User location- See Also:
-
DESCRIPTION
string User personal description- See Also:
-
URL
url User blog address- See Also:
-
PROFILE_IMAGE_URL
url User avatar address (middle), 50×50 pixels- See Also:
-
COVER_IMAGE_PHONE
url User cover image url- See Also:
-
PROFILE_URL
url User's Weibo unified URL address- See Also:
-
DOMAIN
string User's personalized domain name- See Also:
-
WEIHAO
string User's weihao number- See Also:
-
GENDER
string Gender, m: male, f: female, n: unknown- See Also:
-
FOLLOWERS_COUNT
int Number of fans- See Also:
-
FRIENDS_COUNT
int Number of followers- See Also:
-
STATUSES_COUNT
int Weibo number- See Also:
-
FAVOURITES_COUNT
int Number of favorites- See Also:
-
CREATED_AT
string User creation (registration) time- See Also:
-
FOLLOWING
boolean Not supported yet- See Also:
-
ALLOW_ALL_ACT_MSG
boolean Whether to allow everyone to send me a private message, true: yes, false: no- See Also:
-
GEO_ENABLED
boolean Whether to allow identification of the user's geographic location, true: yes, false: no- See Also:
-
VERIFIED
boolean Whether it is a Weibo authenticated user, that is, a V-user, true: yes, false: no- See Also:
-
VERIFIED_TYPE
int Not supported yet- See Also:
-
REMARK
string User note information, this field is only returned when querying user relationships- See Also:
-
STATUS
object User's recent Weibo information field- See Also:
-
ALLOW_ALL_COMMENT
boolean Whether to allow everyone to comment on my Weibo, true: yes, false: no- See Also:
-
AVATAR_LARGE
string User avatar address (larger image), 180 × 180 pixels- See Also:
-
AVATAR_HD
string User avatar address (HD), HD avatar original- See Also:
-
VERIFIED_REASON
string Reason for certification- See Also:
-
FOLLOW_ME
boolean Whether the user is concerned about the currently logged in user, true: yes, false: no- See Also:
-
ONLINE_STATUS
int User's online status, 0: not online, 1: online- See Also:
-
BI_FOLLOWERS_COUNT
int User's mutual powder count- See Also:
-
LANG
string User's current language version, zh-cn: Simplified Chinese, zh-tw: Traditional Chinese, en: English- See Also:
-
-
Constructor Details
-
WeiboProfileDefinition
public WeiboProfileDefinition()Constructor for WeiboProfileDefinition.
-
-
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
- Throws:
org.pac4j.core.exception.http.HttpAction
-