Files
breadcrumb-the-shire/lib/Service/Auth/AuthSettingsGateway.php

60 lines
1.7 KiB
PHP
Raw Normal View History

2026-02-23 12:58:19 +01:00
<?php
namespace MintyPHP\Service\Auth;
2026-03-06 00:44:52 +01:00
use MintyPHP\Service\Settings\SettingsApiPolicyGateway;
use MintyPHP\Service\Settings\SettingsAppGateway;
use MintyPHP\Service\Settings\SettingsDefaultsGateway;
use MintyPHP\Service\Settings\SettingsMicrosoftGateway;
2026-02-23 12:58:19 +01:00
class AuthSettingsGateway
{
2026-03-06 00:44:52 +01:00
public function __construct(
private readonly SettingsMicrosoftGateway $settingsMicrosoftGateway,
private readonly SettingsApiPolicyGateway $settingsApiPolicyGateway,
private readonly SettingsDefaultsGateway $settingsDefaultsGateway,
private readonly SettingsAppGateway $settingsAppGateway
) {
2026-02-23 12:58:19 +01:00
}
public function getMicrosoftSharedClientId(): string
{
2026-03-06 00:44:52 +01:00
return (string) $this->settingsMicrosoftGateway->getMicrosoftSharedClientId();
2026-02-23 12:58:19 +01:00
}
public function getMicrosoftSharedClientSecret(): string
{
2026-03-06 00:44:52 +01:00
return (string) $this->settingsMicrosoftGateway->getMicrosoftSharedClientSecret();
2026-02-23 12:58:19 +01:00
}
public function getMicrosoftAuthority(): string
{
2026-03-06 00:44:52 +01:00
return (string) $this->settingsMicrosoftGateway->getMicrosoftAuthority();
2026-02-23 12:58:19 +01:00
}
public function getApiTokenMaxTtlDays(): int
{
2026-03-06 00:44:52 +01:00
return $this->settingsApiPolicyGateway->getApiTokenMaxTtlDays();
2026-02-23 12:58:19 +01:00
}
public function getApiTokenDefaultTtlDays(): int
{
2026-03-06 00:44:52 +01:00
return $this->settingsApiPolicyGateway->getApiTokenDefaultTtlDays();
2026-02-23 12:58:19 +01:00
}
public function getAppTheme(): string
{
2026-03-06 00:44:52 +01:00
return (string) $this->settingsAppGateway->getAppTheme();
2026-02-23 12:58:19 +01:00
}
public function getDefaultRoleId(): int
{
2026-03-06 00:44:52 +01:00
return (int) $this->settingsDefaultsGateway->getDefaultRoleId();
2026-02-23 12:58:19 +01:00
}
public function getDefaultDepartmentId(): int
{
2026-03-06 00:44:52 +01:00
return (int) $this->settingsDefaultsGateway->getDefaultDepartmentId();
2026-02-23 12:58:19 +01:00
}
}