for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace OAuth\Repository;
use Doctrine\ORM\EntityRepository;
use OAuth2\Storage\ClientCredentialsInterface;
class ClientRepository extends EntityRepository implements ClientCredentialsInterface
{
/**
* @param string $clientId
* @param string|null $clientSecret
* @return bool
*/
public function checkClientCredentials($clientId, $clientSecret = null)
$client = $this->findOneBy(['clientIdentifier' => $clientId]);
if ($client) {
return $client->verifyClientSecret($clientSecret);
}
return false;
* @param $clientId
public function isPublicClient($clientId)
* @return null|array
public function getClientDetails($clientId)
$client = $client->toArray();
return $client;
* @param $client_id
* @return null
public function getClientScope($client_id)
return null;
* @param $grantType
public function checkRestrictedGrantType($clientId, $grantType)
// we do not support different grant types per client in this example
return true;