| Conditions | 2 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | private function retrieveAndValidateToken($token) |
||
| 52 | { |
||
| 53 | try { |
||
| 54 | $verifier = new JWTVerifier([ |
||
| 55 | 'supported_algs' => ["RS256"], |
||
| 56 | 'valid_audiences' => ['https://comment.eynet.xyz/'], |
||
| 57 | 'authorized_iss' => ['https://comment-server.eu.auth0.com/'], |
||
| 58 | ]); |
||
| 59 | |||
| 60 | $verifier->verifyAndDecode($token); |
||
| 61 | return true; |
||
| 62 | } catch (Exception $e) { |
||
| 63 | return false; |
||
| 64 | } |
||
| 67 |