Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
46 | private function updateJwtUser(&$model, $jsonApiAttributes) |
||
47 | { |
||
48 | if(password_verify($jsonApiAttributes[JwtInterface::PASSWORD], $model->password) === false) { |
||
49 | Json::outputErrors( |
||
50 | [ |
||
51 | [ |
||
52 | JSONApiInterface::ERROR_TITLE => 'Password is invalid.', |
||
53 | JSONApiInterface::ERROR_DETAIL => 'To get refreshed token - pass the correct password', |
||
54 | ], |
||
55 | ] |
||
56 | ); |
||
57 | } |
||
58 | |||
59 | $model->jwt = Jwt::create($model->id); |
||
60 | unset($model->password); |
||
61 | } |
||
62 | } |