singleloginsystem/app/Services/Applications/OIDC/Factory/ClientCredentialsClientFactory.php
= 0b77f69818 Feat: Add modular OIDC app creation with logo support
- Introduced new components and services for OIDC app creation, enabling dynamic handling of app types, URIs, and user roles.
- Added support for uploading and managing logos for connected apps.
- Implemented `ClientCreationFactory` and related factories for modular OIDC client generation.
- Updated UI to enhance app creation flow with post-creation credential display and improved validations.
- Refactored backend with `OidcService` for streamlined OIDC app creation and management.
2026-06-18 13:35:23 +00:00

30 lines
772 B
PHP

<?php
declare(strict_types=1);
namespace App\Services\Applications\OIDC\Factory;
use App\Data\Application\{ClientCredentialsData, StoreOIDCAppData};
use Laravel\Passport\ClientRepository;
class ClientCredentialsClientFactory implements ClientCreationContract
{
public function __construct(
private readonly ClientRepository $client,
) {}
public function create(StoreOIDCAppData $data): ClientCredentialsData
{
$client = $this->client->createClientCredentialsGrantClient(
name: $data->name,
);
return new ClientCredentialsData(
clientId: $client->id,
grantType: 'client_credentials',
clientSecret: $client->plainSecret,
redirectUris: null,
);
}
}