BxOktaConConfig.php 1.7 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 OktaConnect Okta Connect
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxOktaConConfig extends BxBaseModConnectConfig
  12. {
  13. public $sDomain;
  14. public $sClientID;
  15. public $sSecret;
  16. public $sScope = 'openid profile email'; // 'okta.users.read';
  17. public $sPageStart;
  18. public $sPageHandle;
  19. public $bAddExtensionsForDuplicateEmails = true;
  20. public $bGetUserInfoFromIdToken = true;
  21. public $sUserIdField = 'identityId';
  22. function __construct($aModule)
  23. {
  24. parent::__construct($aModule);
  25. $this -> bSendPasswordGenerated = false;
  26. $this -> sDomain = getParam('bx_oktacon_domain');
  27. $this -> sClientID = getParam('bx_oktacon_client_id');
  28. $this -> sSecret = getParam('bx_oktacon_secret');
  29. $this -> sScope = getParam('bx_oktacon_scope');
  30. $this -> sEmailTemplatePasswordGenerated = 'bx_oktacon_password_generated';
  31. $this -> sDefaultTitleLangKey = '_bx_oktacon';
  32. $this -> sRedirectPage = getParam('bx_oktacon_redirect_page');
  33. $this -> sProfilesModule = getParam('bx_oktacon_module');
  34. $this -> isAlwaysConfirmEmail = (bool)getParam('bx_oktacon_confirm_email');
  35. $this -> isAlwaysAutoApprove = (bool)getParam('bx_oktacon_approve');
  36. $this -> sPageStart = BX_DOL_URL_ROOT . $this -> getBaseUri() . 'start';
  37. $this -> sPageHandle = BX_DOL_URL_ROOT . $this -> getBaseUri() . 'handle';
  38. bx_import('Custom', $aModule);
  39. $oCustom = new BxOktaConCustom($aModule);
  40. $oCustom->onConfig($this);
  41. }
  42. }
  43. /** @} */