| Total Complexity | 5 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class TestUser implements IdentityInterface |
||
| 7 | { |
||
| 8 | public $id; |
||
| 9 | |||
| 10 | public static function findIdentity($id) |
||
| 11 | { |
||
| 12 | return null; |
||
| 13 | } |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Finds an identity by the given token. |
||
| 17 | * @param mixed $token the token to be looked for |
||
| 18 | * @param mixed $type the type of the token. The value of this parameter depends on the implementation. |
||
| 19 | * For example, [[\yii\filters\auth\HttpBearerAuth]] will set this parameter to be `yii\filters\auth\HttpBearerAuth`. |
||
| 20 | * @return IdentityInterface|null the identity object that matches the given token. |
||
| 21 | * Null should be returned if such an identity cannot be found |
||
| 22 | * or the identity is not in an active state (disabled, deleted, etc.) |
||
| 23 | */ |
||
| 24 | public static function findIdentityByAccessToken($token, $type = null) |
||
| 25 | { |
||
| 26 | return null; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function getId() |
||
| 30 | { |
||
| 31 | return $this->id; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getAuthKey() |
||
| 35 | { |
||
| 36 | return ''; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function validateAuthKey($authKey) |
||
| 42 | } |
||
| 43 | } |
||
| 44 |