- 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.
37 lines
812 B
PHP
37 lines
812 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services\Applications\OIDC;
|
|
|
|
use App\Enums\ApplicationTypeEnum;
|
|
|
|
class OidcConfigResolver
|
|
{
|
|
private ?ApplicationTypeEnum $applicationType = null;
|
|
|
|
public function for(ApplicationTypeEnum $applicationType): OidcConfigResolver
|
|
{
|
|
$this->applicationType = $applicationType;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function hasClientSecret(): bool
|
|
{
|
|
return ApplicationTypeEnum::SPA !== $this->applicationType;
|
|
}
|
|
|
|
public function needSignInUris(): bool
|
|
{
|
|
return true;
|
|
// return ApplicationTypeEnum::Machine !== $this->applicationType;
|
|
}
|
|
|
|
public function needSignOutUris(): bool
|
|
{
|
|
return true;
|
|
// return ApplicationTypeEnum::Machine !== $this->applicationType;
|
|
}
|
|
}
|