2026-02-23 12:58:19 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Service\Auth;
|
|
|
|
|
|
2026-03-05 08:26:51 +01:00
|
|
|
use MintyPHP\Repository\User\UserExternalIdentityRepositoryInterface;
|
2026-02-23 12:58:19 +01:00
|
|
|
|
|
|
|
|
class AuthExternalIdentityGateway
|
|
|
|
|
{
|
2026-03-05 08:26:51 +01:00
|
|
|
public function __construct(private readonly UserExternalIdentityRepositoryInterface $userExternalIdentityRepository)
|
2026-02-23 12:58:19 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findByProviderTidOid(string $provider, string $tid, string $oid): ?array
|
|
|
|
|
{
|
|
|
|
|
return $this->userExternalIdentityRepository->findByProviderTidOid($provider, $tid, $oid);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findByProviderIssuerSubject(string $provider, string $issuer, string $subject): ?array
|
|
|
|
|
{
|
|
|
|
|
return $this->userExternalIdentityRepository->findByProviderIssuerSubject($provider, $issuer, $subject);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function createLink(array $data): bool
|
|
|
|
|
{
|
|
|
|
|
return (bool) $this->userExternalIdentityRepository->createLink($data);
|
|
|
|
|
}
|
|
|
|
|
}
|