Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
<?php
namespace HiEvents\Http\Actions\Auth\Sso;
use HiEvents\Enterprise\Sso\Services\Domain\DTO\LinkableSsoConnection;
use HiEvents\Http\Actions\BaseAction;
use HiEvents\Http\Attributes\AllowedForReadOnlyUsers;
use HiEvents\Resources\Auth\Sso\UserIdentityResource;
use HiEvents\Services\Application\Handlers\Auth\Sso\GetSsoIdentitiesHandler;
use Illuminate\Http\JsonResponse;
#[AllowedForReadOnlyUsers]
class GetSsoIdentitiesAction extends BaseAction
{
public function __construct(
private readonly GetSsoIdentitiesHandler $handler,
) {}
public function __invoke(): JsonResponse
{
$result = $this->handler->handle($this->getAuthenticatedUser()->getId());
return $this->resourceResponse(
UserIdentityResource::class,
$result->identities,
meta: [
'linkable_connections' => $result->linkableConnections
->map(fn (LinkableSsoConnection $connection) => [
'key' => $connection->key,
'name' => $connection->name,
'type' => $connection->type->value,
'logo_url' => null,
'account_name' => $connection->accountName,
])
->all(),
],
);
}
}