BxAzrB2CConfig.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 AzureB2CConnect Azure B2C Connect
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxAzrB2CConfig extends BxBaseModConnectConfig
  12. {
  13. public $sDomain;
  14. public $sTenant;
  15. public $sPolicy;
  16. public $sTenantID = 'common';
  17. public $sClientID;
  18. public $sSecret;
  19. public $sScope = 'openid';// 'openid offline_acces https://graph.microsoft.com/User.Read';
  20. public $sLogoutUrl = 'https://login.microsoftonline.com/common/wsfederation?wa=wsignout1.0';
  21. public $sPageStart;
  22. public $sPageHandle;
  23. function __construct($aModule)
  24. {
  25. parent::__construct($aModule);
  26. $this -> sDomain = getParam('bx_azrb2c_domain');
  27. $this -> sTenant = getParam('bx_azrb2c_tenant');
  28. $this -> sPolicy = getParam('bx_azrb2c_policy');
  29. $this -> sTenantID = getParam('bx_azrb2c_tenant_id');
  30. $this -> sClientID = getParam('bx_azrb2c_client_id');
  31. $this -> sScope = getParam('bx_azrb2c_client_id');
  32. $this -> sSecret = getParam('bx_azrb2c_secret');
  33. $this -> sEmailTemplatePasswordGenerated = 'bx_azrb2c_password_generated';
  34. $this -> sDefaultTitleLangKey = '_bx_azrb2c';
  35. $this -> sRedirectPage = getParam('bx_azrb2c_redirect_page');
  36. $this -> sProfilesModule = getParam('bx_azrb2c_module');
  37. $this -> isAlwaysConfirmEmail = (bool)getParam('bx_azrb2c_confirm_email');
  38. $this -> isAlwaysAutoApprove = (bool)getParam('bx_azrb2c_approve');
  39. $this -> sPageStart = BX_DOL_URL_ROOT . $this -> getBaseUri() . 'start';
  40. $this -> sPageHandle = BX_DOL_URL_ROOT . $this -> getBaseUri() . 'handle';
  41. }
  42. }
  43. /** @} */