| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 22 | public static function generate(RequestInterface $request, string $issuer, string $secret): string |
||
| 23 | { |
||
| 24 | $data = [ |
||
| 25 | 'iss' => $issuer, |
||
| 26 | 'iat' => \time(), |
||
| 27 | 'exp' => \strtotime('+1 day'), |
||
| 28 | 'qsh' => QSHGenerator::generate((string) $request->getUri(), $request->getMethod()), |
||
| 29 | ]; |
||
| 30 | |||
| 31 | return JWT::encode($data, $secret); |
||
| 32 | } |
||
| 56 |