| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 12.5% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 19 | class Clients extends \Nip\Records\RecordManager implements ClientRepositoryInterface |
||
| 20 | { |
||
| 21 | 1 | use SingletonTrait; |
|
| 22 | |||
| 23 | /** |
||
| 24 | * {@inheritdoc} |
||
| 25 | */ |
||
| 26 | public function getClientEntity($clientIdentifier) |
||
| 27 | { |
||
| 28 | $client = $this->findOneByIdentifier($clientIdentifier); |
||
| 29 | |||
| 30 | // if (!$client || !$client->handlesGrant($grantType)) { |
||
| 31 | // return; |
||
| 32 | // } |
||
| 33 | // |
||
| 34 | // if ($mustValidateSecret && !$client->validateSecret($clientSecret)) { |
||
| 35 | // return; |
||
| 36 | // } |
||
| 37 | return $client; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** @noinspection PhpMissingParentCallCommonInspection |
||
| 41 | * @inheritDoc |
||
| 42 | */ |
||
| 43 | protected function generateTable() |
||
| 44 | { |
||
| 45 | return 'oauth_clients'; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @inheritDoc |
||
| 50 | * @TODO add some validation logic |
||
| 51 | */ |
||
| 52 | public function validateClient($clientIdentifier, $clientSecret, $grantType) |
||
| 55 | } |
||
| 56 | } |
||
| 57 |