- Introduced tests for OIDC app creation, including validation for access URL formatting. - Updated enums and services to streamline application type and protocol handling. - Added `accessUrl` support across backend, services, and UI to enhance app functionality and user accessibility. - Refactored and commented out unused enum values and providers to improve maintainability.
24 lines
708 B
PHP
24 lines
708 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services\Applications\OIDC\Factory;
|
|
|
|
use App\Enums\ApplicationTypeEnum;
|
|
|
|
class ClientCreationFactory
|
|
{
|
|
public function __construct(
|
|
// private readonly ClientCredentialsClientFactory $clientCredentialsClient,
|
|
private readonly AuthorizationCodeClientFactory $authorizationCodeClient,
|
|
) {}
|
|
|
|
public function for(ApplicationTypeEnum $applicationType): ClientCreationContract
|
|
{
|
|
return match ($applicationType) {
|
|
ApplicationTypeEnum::Web, ApplicationTypeEnum::SPA => $this->authorizationCodeClient,
|
|
// ApplicationTypeEnum::Machine => $this->clientCredentialsClient,
|
|
};
|
|
}
|
|
}
|