| Total Complexity | 7 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 53.33% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 10 | final class CognitoUserProvider implements UserProvider |
||
| 11 | { |
||
| 12 | private $clientAppParser; |
||
| 13 | |||
| 14 | private $accessTokenParser; |
||
|
|
|||
| 15 | |||
| 16 | 2 | public function __construct(ClientAppParser $clientAppParser/*, AccessTokenParser $accessTokenParser*/) |
|
| 19 | // $this->accessTokenParser = $accessTokenParser; |
||
| 20 | 2 | } |
|
| 21 | |||
| 22 | 2 | public function retrieveByCredentials(array $credentials) |
|
| 23 | { |
||
| 24 | 2 | $token = $credentials['cognito_token']; |
|
| 25 | |||
| 26 | try { |
||
| 27 | 2 | return $this->clientAppParser->parse($token); |
|
| 28 | 1 | } catch (Exception $e) { |
|
| 29 | |||
| 30 | } |
||
| 31 | /* |
||
| 32 | try { |
||
| 33 | return $this->accessTokenParser->parse($token); |
||
| 34 | } catch (Exception $e) { |
||
| 35 | |||
| 36 | } |
||
| 37 | */ |
||
| 38 | 1 | return null; |
|
| 39 | } |
||
| 40 | |||
| 41 | /** @phpstan ignore */ |
||
| 42 | public function validateCredentials(Authenticatable $user, array $credentials) |
||
| 44 | } |
||
| 45 | |||
| 46 | /** @phpstan ignore */ |
||
| 47 | public function retrieveById($identifier) |
||
| 48 | { |
||
| 49 | } |
||
| 50 | |||
| 51 | /** @phpstan ignore */ |
||
| 52 | public function retrieveByToken($identifier, $token) |
||
| 54 | } |
||
| 55 | |||
| 56 | /** @phpstan ignore */ |
||
| 57 | public function updateRememberToken(Authenticatable $user, $token) |
||
| 61 |