This commit is contained in:
Charles 2025-07-09 09:21:47 +02:00
parent 6a9b7568af
commit c81142e4a5
2 changed files with 0 additions and 31 deletions

View File

@ -25,12 +25,4 @@ class AccessTokenService
}
}
public function getUserFromToken(string $token)
{
$data = json_decode(base64_decode(strtr($token, '-_', '+/')), true);
if (isset($data['user_identifier'])) {
return $data['user_identifier'];
}
return null;
}
}

View File

@ -1,23 +0,0 @@
<?php
namespace App\Service;
use League\Bundle\OAuth2ServerBundle\Model\Client;
use Doctrine\ORM\EntityManagerInterface;
class ClientService{
/**
* Retrieves a Client entity by its identifier.
*
* @param string $identifier The identifier of the client.
* @param EntityManagerInterface $entityManager The entity manager to use for database operations.
* @return Client|null The Client entity or null if not found.
*/
public function getClientIdentifier(String $identifier, EntityManagerInterface $entityManager): Client
{
return $entityManager->getRepository(Client::class)->findOneBy(['identifier' => $identifier]);
}
}