= 9c9e3ca43c Feat: Update App details from view page
- Implemented the `show` page for managing URL apps with functionalities like updating name, logo, access URL, and connection status.
- Added `UrlAppViewTest` for feature testing, ensuring role-based access, and validation of edit actions.
- Updated navigation to route URL apps to their respective management views.
- Enhanced `OidcService` to handle updated app settings and redirect URIs.
2026-06-22 11:20:49 +00:00

48 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Services\Applications\OIDC;
use App\Enums\ApplicationTypeEnum;
use Laravel\Passport\Client;
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;
}
public function isConfidential(Client $client): bool
{
return $client->confidential();
}
public function requiresPkce(Client $client): bool
{
return ! $client->confidential();
}
}