BxLinkedinConfig.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup LinkedInConnect LinkedIn Connect
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxLinkedinConfig extends BxBaseModConnectConfig
  12. {
  13. public $sApiID;
  14. public $sApiSecret;
  15. public $sApiUrl = 'https://api.linkedin.com/v2';
  16. public $sOauthUrl = 'https://www.linkedin.com/oauth/v2';
  17. public $sFields = 'id,firstName,lastName,profilePicture(displayImage~:playableStreams)';
  18. public $sPageStart;
  19. public $sPageHandle;
  20. public $sScope = 'openid email profile';
  21. function __construct($aModule)
  22. {
  23. parent::__construct($aModule);
  24. $this -> sApiID = getParam('bx_linkedin_api_key');
  25. $this -> sApiSecret = getParam('bx_linkedin_secret');
  26. $this -> sSessionUid = 'linkedin_session';
  27. $this -> sSessionProfile = 'linkedin_session_profile';
  28. $this -> sEmailTemplatePasswordGenerated = 'bx_linkedin_password_generated';
  29. $this -> sDefaultTitleLangKey = '_bx_linkedin';
  30. $this -> sRedirectPage = getParam('bx_linkedin_redirect_page');
  31. $this -> sProfilesModule = getParam('bx_linkedin_module');
  32. $this -> isAlwaysConfirmEmail = (bool)getParam('bx_linkedin_confirm_email');
  33. $this -> isAlwaysAutoApprove = (bool)getParam('bx_linkedin_approve');
  34. $this -> sPageStart = BX_DOL_URL_ROOT . $this -> getBaseUri() . 'start';
  35. $this -> sPageHandle = BX_DOL_URL_ROOT . $this -> getBaseUri() . 'handle';
  36. }
  37. }
  38. /** @} */