Class 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  
      • Fields inherited from class org.pac4j.core.profile.definition.CommonProfileDefinition

        DISPLAY_NAME, EMAIL, FAMILY_NAME, FIRST_NAME, GENDER, LOCALE, LOCATION, PICTURE_URL, PROFILE_URL
      • Fields inherited from class org.pac4j.core.profile.definition.ProfileDefinition

        logger
    • 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.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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OkProfileDefinition

        public OkProfileDefinition()
    • 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 class OAuthProfileDefinition
        Parameters:
        token - only used when constructing dynamic urls from data in the token
        configuration - 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