- 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.
39 lines
1.2 KiB
PHP
39 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Data\Application;
|
|
|
|
use App\Enums\{ApplicationTypeEnum, UserAccessTypeEnum};
|
|
use Livewire\Features\SupportFileUploads\TemporaryUploadedFile;
|
|
use Spatie\LaravelData\Data;
|
|
|
|
class StoreOIDCAppData extends Data
|
|
{
|
|
public function __construct(
|
|
public ApplicationTypeEnum $type,
|
|
public string $name,
|
|
public UserAccessTypeEnum $userAccessType,
|
|
/** @var array<string> */
|
|
public array $signInUris = [],
|
|
/** @var array<string> */
|
|
public array $signOutUris = [],
|
|
public ?TemporaryUploadedFile $logo = null,
|
|
/** @var array<int> */
|
|
public array $roleIds = [],
|
|
) {}
|
|
|
|
public static function fromArray(ApplicationTypeEnum $applicationType, array $value): StoreOIDCAppData
|
|
{
|
|
return new self(
|
|
type: $applicationType,
|
|
name: $value['name'],
|
|
userAccessType: UserAccessTypeEnum::from($value['userAccessOption']),
|
|
signInUris: $value['signInUris'] ?? [],
|
|
signOutUris: $value['signOutUris'] ?? [],
|
|
logo: $value['logo'] ?? null,
|
|
roleIds: $value['roleIds'] ?? [],
|
|
);
|
|
}
|
|
}
|