Conditions | 2 |
Paths | 4 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function decodePreviousToken($token = null) |
||
30 | { |
||
31 | try { |
||
32 | $jwt = new JwtWrapper(Psr11::container()->get('JWT_SERVER'), Psr11::container()->get('JWT_SECRET')); |
||
33 | $tokenInfo = json_decode(json_encode($jwt->extractData($token)), true); |
||
34 | return $tokenInfo['data']; |
||
35 | } catch (\Exception $ex) { |
||
36 | throw new Error401Exception($ex->getMessage()); |
||
37 | } |
||
40 |