Package org.pac4j.oauth.profile.vk
Class VkProfileDefinition
- 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.vk.VkProfileDefinition
-
public class VkProfileDefinition extends OAuthProfileDefinition
This class is the Vk profile definition.- Since:
- 1.5
- Author:
- indvdum (gotoindvdum[at]gmail[dot]com)
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
BASE_URL
static java.lang.String
BIRTH_DATE
static java.lang.String
CAN_POST
static java.lang.String
CAN_SEE_ALL_POST
static java.lang.String
CAN_SEE_AUDIO
static java.lang.String
CAN_WRITE_PRIVATE_MESSAGE
static java.lang.String
COMMON_COUNT
static java.lang.String
DOMAIN
static java.lang.String
HAS_MOBILE
static java.lang.String
HOME_PHONE
static java.lang.String
LAST_NAME
static java.lang.String
MOBILE_PHONE
static java.lang.String
ONLINE
static java.lang.String
ONLINE_MOBILE
static java.lang.String
PHOTO_100
static java.lang.String
PHOTO_200
static java.lang.String
PHOTO_200_ORIG
static java.lang.String
PHOTO_400_ORIG
static java.lang.String
PHOTO_50
static java.lang.String
PHOTO_MAX
static java.lang.String
PHOTO_MAX_ORIG
static java.lang.String
RELATION
static java.lang.String
SEX
static java.lang.String
SITE
static java.lang.String
SKYPE
static java.lang.String
STATUS
-
Constructor Summary
Constructors Constructor Description VkProfileDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VkProfile
extractUserProfile(java.lang.String body)
Extract the user profile from the response (JSON, XML...) of the profile url.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.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, getParameter, getPrimaryAttributes, getProfileId, getSecondaryAttributes, isRestoreProfileFromTypedId, newProfile, primary, secondary, setProfileFactory, setProfileId, setRestoreProfileFromTypedId
-
-
-
-
Field Detail
-
LAST_NAME
public static final java.lang.String LAST_NAME
- See Also:
- Constant Field Values
-
SEX
public static final java.lang.String SEX
- See Also:
- Constant Field Values
-
BIRTH_DATE
public static final java.lang.String BIRTH_DATE
- See Also:
- Constant Field Values
-
PHOTO_50
public static final java.lang.String PHOTO_50
- See Also:
- Constant Field Values
-
PHOTO_100
public static final java.lang.String PHOTO_100
- See Also:
- Constant Field Values
-
PHOTO_200_ORIG
public static final java.lang.String PHOTO_200_ORIG
- See Also:
- Constant Field Values
-
PHOTO_200
public static final java.lang.String PHOTO_200
- See Also:
- Constant Field Values
-
PHOTO_400_ORIG
public static final java.lang.String PHOTO_400_ORIG
- See Also:
- Constant Field Values
-
PHOTO_MAX
public static final java.lang.String PHOTO_MAX
- See Also:
- Constant Field Values
-
PHOTO_MAX_ORIG
public static final java.lang.String PHOTO_MAX_ORIG
- See Also:
- Constant Field Values
-
ONLINE
public static final java.lang.String ONLINE
- See Also:
- Constant Field Values
-
ONLINE_MOBILE
public static final java.lang.String ONLINE_MOBILE
- See Also:
- Constant Field Values
-
DOMAIN
public static final java.lang.String DOMAIN
- See Also:
- Constant Field Values
-
HAS_MOBILE
public static final java.lang.String HAS_MOBILE
- See Also:
- Constant Field Values
-
MOBILE_PHONE
public static final java.lang.String MOBILE_PHONE
- See Also:
- Constant Field Values
-
HOME_PHONE
public static final java.lang.String HOME_PHONE
- See Also:
- Constant Field Values
-
SKYPE
public static final java.lang.String SKYPE
- See Also:
- Constant Field Values
-
SITE
public static final java.lang.String SITE
- See Also:
- Constant Field Values
-
CAN_POST
public static final java.lang.String CAN_POST
- See Also:
- Constant Field Values
-
CAN_SEE_ALL_POST
public static final java.lang.String CAN_SEE_ALL_POST
- See Also:
- Constant Field Values
-
CAN_SEE_AUDIO
public static final java.lang.String CAN_SEE_AUDIO
- See Also:
- Constant Field Values
-
CAN_WRITE_PRIVATE_MESSAGE
public static final java.lang.String CAN_WRITE_PRIVATE_MESSAGE
- See Also:
- Constant Field Values
-
STATUS
public static final java.lang.String STATUS
- See Also:
- Constant Field Values
-
COMMON_COUNT
public static final java.lang.String COMMON_COUNT
- See Also:
- Constant Field Values
-
RELATION
public static final java.lang.String RELATION
- See Also:
- Constant Field Values
-
BASE_URL
protected static final java.lang.String BASE_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 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
public VkProfile extractUserProfile(java.lang.String body)
Description copied from class:OAuthProfileDefinition
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
-
-