[PLUGIN][OAuth2] Fix some static issues

This commit is contained in:
2022-02-04 18:34:08 +00:00
parent 4dd976eb22
commit 81f6d496c6
15 changed files with 206 additions and 202 deletions

View File

@@ -40,12 +40,12 @@ use Plugin\OAuth2\Entity;
class Client implements ClientRepositoryInterface
{
public function getClientEntity($clientIdentifier)
{
return DB::findOneBy(Entity\Client::class, ['id' => $clientIdentifier]);
}
public function validateClient($clientIdentifier, $clientSecret, $grantType)
/**
* @param string $clientIdentifier
* @param null|string $clientSecret
* @param null|string $grantType
*/
public function validateClient($clientIdentifier, $clientSecret, $grantType): bool
{
try {
/** @var Entity\Client $client */
@@ -58,4 +58,13 @@ class Client implements ClientRepositoryInterface
}
return true;
}
/**
* @throws \App\Util\Exception\DuplicateFoundException
* @throws NotFoundException
*/
public function getClientEntity($clientIdentifier)
{
return DB::findOneBy(Entity\Client::class, ['id' => $clientIdentifier]);
}
}