Package org.pac4j.oauth.profile.ok
Class OkProfileDefinition
- 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.ok.OkProfileDefinition
-
public class OkProfileDefinition extends OAuthProfileDefinition
Represents the profile definitions on Ok.ru (Odnoklassniki.ru)- Since:
- 1.8
- Author:
- imayka (imayka[at]ymail[dot]com)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAGEstatic java.lang.StringBIRTHDAYstatic java.lang.StringCURRENT_STATUSstatic java.lang.StringCURRENT_STATUS_DATEstatic java.lang.StringCURRENT_STATUS_IDstatic java.lang.StringHAS_EMAILstatic java.lang.StringLAST_NAMEstatic java.lang.StringLOCATION_CITYstatic java.lang.StringLOCATION_COUNTRYstatic java.lang.StringLOCATION_COUNTRY_CODEstatic java.lang.StringLOCATION_COUNTRY_NAMEstatic java.lang.StringNAMEstatic java.lang.StringONLINEstatic java.lang.StringPIC_1static java.lang.StringPIC_2static java.lang.StringUID
-
Constructor Summary
Constructors Constructor Description OkProfileDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OkProfileextractUserProfile(java.lang.String body)Extract the user profile from the response (JSON, XML...) of the profile url.protected java.lang.StringgetMD5SignAsHexString(java.lang.String strForEncoding)java.lang.StringgetProfileUrl(com.github.scribejava.core.model.Token token, 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
-
UID
public static final java.lang.String UID
- See Also:
- Constant Field Values
-
BIRTHDAY
public static final java.lang.String BIRTHDAY
- See Also:
- Constant Field Values
-
AGE
public static final java.lang.String AGE
- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
LOCATION_CITY
public static final java.lang.String LOCATION_CITY
- See Also:
- Constant Field Values
-
LOCATION_COUNTRY
public static final java.lang.String LOCATION_COUNTRY
- See Also:
- Constant Field Values
-
LOCATION_COUNTRY_CODE
public static final java.lang.String LOCATION_COUNTRY_CODE
- See Also:
- Constant Field Values
-
LOCATION_COUNTRY_NAME
public static final java.lang.String LOCATION_COUNTRY_NAME
- See Also:
- Constant Field Values
-
ONLINE
public static final java.lang.String ONLINE
- See Also:
- Constant Field Values
-
LAST_NAME
public static final java.lang.String LAST_NAME
- See Also:
- Constant Field Values
-
HAS_EMAIL
public static final java.lang.String HAS_EMAIL
- See Also:
- Constant Field Values
-
CURRENT_STATUS
public static final java.lang.String CURRENT_STATUS
- See Also:
- Constant Field Values
-
CURRENT_STATUS_ID
public static final java.lang.String CURRENT_STATUS_ID
- See Also:
- Constant Field Values
-
CURRENT_STATUS_DATE
public static final java.lang.String CURRENT_STATUS_DATE
- See Also:
- Constant Field Values
-
PIC_1
public static final java.lang.String PIC_1
- See Also:
- Constant Field Values
-
PIC_2
public static final java.lang.String PIC_2
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProfileUrl
public java.lang.String getProfileUrl(com.github.scribejava.core.model.Token token, OAuthConfiguration configuration)Description copied from class:OAuthProfileDefinitionRetrieve the url of the profile of the authenticated user for the provider.- Specified by:
getProfileUrlin classOAuthProfileDefinition- Parameters:
token- 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
-
getMD5SignAsHexString
protected java.lang.String getMD5SignAsHexString(java.lang.String strForEncoding) throws java.security.NoSuchAlgorithmException- Throws:
java.security.NoSuchAlgorithmException
-
extractUserProfile
public OkProfile extractUserProfile(java.lang.String body)
Description copied from class:OAuthProfileDefinitionExtract 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
-
-