agent foundation
This commit is contained in:
@@ -4,14 +4,20 @@ namespace MintyPHP\Service\Auth;
|
||||
|
||||
use MintyPHP\Service\Access\AccessServicesFactory;
|
||||
use MintyPHP\Service\Access\PermissionGateway;
|
||||
use MintyPHP\Service\Settings\SettingGateway;
|
||||
use MintyPHP\Service\Settings\SettingServicesFactory;
|
||||
use MintyPHP\Service\Settings\SettingsApiPolicyGateway;
|
||||
use MintyPHP\Service\Settings\SettingsAppGateway;
|
||||
use MintyPHP\Service\Settings\SettingsDefaultsGateway;
|
||||
use MintyPHP\Service\Settings\SettingsMicrosoftGateway;
|
||||
use MintyPHP\Service\Tenant\TenantScopeService;
|
||||
use MintyPHP\Service\User\UserServicesFactory;
|
||||
|
||||
class AuthGatewayFactory
|
||||
{
|
||||
private ?SettingGateway $settingGateway = null;
|
||||
private ?SettingsMicrosoftGateway $settingsMicrosoftGateway = null;
|
||||
private ?SettingsApiPolicyGateway $settingsApiPolicyGateway = null;
|
||||
private ?SettingsDefaultsGateway $settingsDefaultsGateway = null;
|
||||
private ?SettingsAppGateway $settingsAppGateway = null;
|
||||
private ?PermissionGateway $permissionGateway = null;
|
||||
private ?AuthSettingsGateway $authSettingsGateway = null;
|
||||
private ?AuthScopeGateway $authScopeGateway = null;
|
||||
@@ -34,7 +40,12 @@ class AuthGatewayFactory
|
||||
|
||||
public function createAuthSettingsGateway(): AuthSettingsGateway
|
||||
{
|
||||
return $this->authSettingsGateway ??= new AuthSettingsGateway($this->createSettingGateway());
|
||||
return $this->authSettingsGateway ??= new AuthSettingsGateway(
|
||||
$this->createSettingsMicrosoftGateway(),
|
||||
$this->createSettingsApiPolicyGateway(),
|
||||
$this->createSettingsDefaultsGateway(),
|
||||
$this->createSettingsAppGateway()
|
||||
);
|
||||
}
|
||||
|
||||
public function createAuthScopeGateway(): AuthScopeGateway
|
||||
@@ -90,9 +101,24 @@ class AuthGatewayFactory
|
||||
return $this->permissionGateway ??= $this->accessServicesFactory->createPermissionGateway();
|
||||
}
|
||||
|
||||
private function createSettingGateway(): SettingGateway
|
||||
private function createSettingsMicrosoftGateway(): SettingsMicrosoftGateway
|
||||
{
|
||||
return $this->settingGateway ??= $this->settingServicesFactory->createSettingGateway();
|
||||
return $this->settingsMicrosoftGateway ??= $this->settingServicesFactory->createSettingsMicrosoftGateway();
|
||||
}
|
||||
|
||||
private function createSettingsApiPolicyGateway(): SettingsApiPolicyGateway
|
||||
{
|
||||
return $this->settingsApiPolicyGateway ??= $this->settingServicesFactory->createSettingsApiPolicyGateway();
|
||||
}
|
||||
|
||||
private function createSettingsDefaultsGateway(): SettingsDefaultsGateway
|
||||
{
|
||||
return $this->settingsDefaultsGateway ??= $this->settingServicesFactory->createSettingsDefaultsGateway();
|
||||
}
|
||||
|
||||
private function createSettingsAppGateway(): SettingsAppGateway
|
||||
{
|
||||
return $this->settingsAppGateway ??= $this->settingServicesFactory->createSettingsAppGateway();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user