roleService = $roleService; $this->oidcService = $oidcService; $this->configResolver = $configResolver; } public function mount(): void { $this->applicationType = ApplicationTypeEnum::from($this->type); } public function render() { /** @phpstan-ignore-next-line */ return $this->view()->title($this->title()); } public function save(bool $goBack = true): void { $this->form->validate(); $this->attempt( function () { $data = StoreOIDCAppData::fromArray($this->applicationType, $this->form->pull()); $appdata = $this->oidcService->createApp($data); // Show the credentials $this->created = true; $this->clientId = $appdata->clientCredentials->clientId; $this->clientSecret = $appdata->clientCredentials->clientSecret; $this->app = $appdata->application; } ); } public function goBack(): void { $this->redirectRoute("apps.index", navigate: true); } public function title(): string { $title = "New "; $title .= match ($this->applicationType) { ApplicationTypeEnum::Web => "Web Application ", ApplicationTypeEnum::SPA => "Single Page Application ", ApplicationTypeEnum::Machine => "Microservice Application ", }; $title .= "Integration"; return $title; } public function searchRoles(string $q = ''): void { $this->searchChoice('roles', $q); } public function selectAllRoles(): void { $this->selectAllChoice('roles'); } public function clearRoles(): void { $this->clearChoice('roles'); } protected function choiceFields(): array { return [ 'roles' => new ChoiceField( search: fn(string $q): array => $this->roleService->searchRolesForSelect($q)->toArray(), allIds: $this->roleService->getAllRoleIds(...), formPath: 'form.roleIds', ), ]; } #[Computed] public function hasClientSecret(): bool { return $this->configResolver->for($this->applicationType)->hasClientSecret(); } }; ?>
@if($created)

{{$app->name}}

@if($this->hasClientSecret) @endif
Done
@else Go Back

General Settings


Sign In Redirect URIs

{{config('app.name')}} sends response and ID Token back to these URIs.


Sign out Redirect URIs

{{config('app.name')}} sends back the user to these URIs after logout.


User Access

Choose whether to allow all users be able to connect this app or selected ones.

Cancel Save & Add Another Save
@endif