BxCidaasConConfig.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 CidaasConnect Cidaas Connect
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxCidaasConConfig extends BxBaseModConnectConfig
  12. {
  13. public $sBaseUrl;
  14. public $sClientID;
  15. public $sSecret;
  16. public $sScope = 'openid profile email offline_access';
  17. public $bPkce = false;
  18. public $bDebug = false;
  19. public $sPageStart;
  20. public $sPageHandle;
  21. public $sSessionCodeVerifier;
  22. function __construct($aModule)
  23. {
  24. parent::__construct($aModule);
  25. $this->sBaseUrl = rtrim(getParam('bx_cidaascon_base_url'), '/');
  26. $this->sClientID = getParam('bx_cidaascon_client_id');
  27. $this->sSecret = getParam('bx_cidaascon_secret');
  28. $this->sScope = getParam('bx_cidaascon_scope') ? getParam('bx_cidaascon_scope') : $this->sScope;
  29. $this->bPkce = (bool)getParam('bx_cidaascon_pkce');
  30. $this->bDebug = (bool)getParam('bx_cidaascon_debug');
  31. $this->sSessionUid = 'cidaascon_session';
  32. $this->sSessionProfile = 'cidaascon_session_profile';
  33. $this->sSessionCodeVerifier = 'cidaascon_code_verifier';
  34. $this->sEmailTemplatePasswordGenerated = 'bx_cidaascon_password_generated';
  35. $this->sDefaultTitleLangKey = '_bx_cidaascon';
  36. $this->sRedirectPage = getParam('bx_cidaascon_redirect_page');
  37. $this->sProfilesModule = getParam('bx_cidaascon_module');
  38. $this->isAlwaysConfirmEmail = (bool)getParam('bx_cidaascon_confirm_email');
  39. $this->isAlwaysAutoApprove = (bool)getParam('bx_cidaascon_approve');
  40. $this->sPageStart = BX_DOL_URL_ROOT . $this->getBaseUri() . 'start';
  41. $this->sPageHandle = BX_DOL_URL_ROOT . $this->getBaseUri() . 'handle';
  42. }
  43. }
  44. /** @} */