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.String
AGE
static java.lang.String
BIRTHDAY
static java.lang.String
CURRENT_STATUS
static java.lang.String
CURRENT_STATUS_DATE
static java.lang.String
CURRENT_STATUS_ID
static java.lang.String
HAS_EMAIL
static java.lang.String
LAST_NAME
static java.lang.String
LOCATION_CITY
static java.lang.String
LOCATION_COUNTRY
static java.lang.String
LOCATION_COUNTRY_CODE
static java.lang.String
LOCATION_COUNTRY_NAME
static java.lang.String
NAME
static java.lang.String
ONLINE
static java.lang.String
PIC_1
static java.lang.String
PIC_2
static java.lang.String
UID
-
Constructor Summary
Constructors Constructor Description OkProfileDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OkProfile
extractUserProfile(java.lang.String body)
Extract the user profile from the response (JSON, XML...) of the profile url.protected java.lang.String
getMD5SignAsHexString(java.lang.String strForEncoding)
java.lang.String
getProfileUrl(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:OAuthProfileDefinition
Retrieve the url of the profile of the authenticated user for the provider.- Specified by:
getProfileUrl
in 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: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
-
-