| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public static function generate(string $url, string $method, string $issuer, string $secret): string |
||
| 12 | { |
||
| 13 | $data = [ |
||
| 14 | 'iss' => $issuer, |
||
| 15 | 'iat' => time(), |
||
| 16 | 'exp' => strtotime('+1 day'), |
||
| 17 | 'qsh' => QSHGenerator::generate($url, $method), |
||
| 18 | ]; |
||
| 19 | |||
| 20 | return JWT::encode($data, $secret, 'HS256'); |
||
| 21 | } |
||
| 37 |