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
Modifier and TypeFieldDescriptionstatic final String
boolean Whether to allow everyone to send me a private message, true: yes, false: nostatic final String
boolean Whether to allow everyone to comment on my Weibo, true: yes, false: nostatic final String
string User avatar address (HD), HD avatar originalstatic final String
string User avatar address (larger image), 180 × 180 pixelsstatic final String
int User's mutual powder countstatic final String
int User's city IDstatic final String
url User cover image urlstatic final String
string User creation (registration) timestatic final String
string User personal descriptionstatic final String
string User's personalized domain namestatic final String
int Number of favoritesstatic final String
boolean Whether the user is concerned about the currently logged in user, true: yes, false: nostatic final String
int Number of fansstatic final String
boolean Not supported yetstatic final String
int Number of followersstatic final String
string Gender, m: male, f: female, n: unknownstatic final String
boolean Whether to allow identification of the user's geographic location, true: yes, false: nostatic final String
int64 User UIDstatic final String
string String-type user UIDstatic final String
string User's current language version, zh-cn: Simplified Chinese, zh-tw: Traditional Chinese, en: Englishstatic final String
string User locationstatic final String
string Friendly display namestatic final String
int User's online status, 0: not online, 1: onlinestatic final String
url User avatar address (middle), 50×50 pixelsstatic final String
url User's Weibo unified URL addressstatic final String
int User's provincial IDstatic final String
string User note information, this field is only returned when querying user relationshipsstatic final String
string User's Nicknamestatic final String
object User's recent Weibo information fieldstatic final String
int Weibo numberstatic final String
url User blog addressstatic final String
boolean Whether it is a Weibo authenticated user, that is, a V-user, true: yes, false: nostatic final String
string Reason for certificationstatic final String
int Not supported yetstatic final String
string User's weihao numberFields inherited from class org.pac4j.core.profile.definition.CommonProfileDefinition
DISPLAY_NAME, EMAIL, FAMILY_NAME, FIRST_NAME, LOCALE, PICTURE_URL
Fields inherited from class org.pac4j.core.profile.definition.ProfileDefinition
logger
-
Constructor Summary
-
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, 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, 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:
getProfileUrl
in 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:
extractUserProfile
in classOAuthProfileDefinition
- Parameters:
body
- the response body- Returns:
- the returned profile
- Throws:
org.pac4j.core.exception.http.HttpAction
-