| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public static function generate(string $clientId, string $clientKey, string $serverKey): string |
||
| 16 | { |
||
| 17 | return JWT::encode( |
||
| 18 | // Do not change array key order here, it is important (unit test fails). |
||
| 19 | // phpcs:ignore SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys.IncorrectKeyOrder |
||
| 20 | [ |
||
| 21 | 'sub' => $clientId, |
||
| 22 | 'clientKey' => $clientKey, |
||
| 23 | ], // payload PHP object or array |
||
| 24 | $serverKey, // key The secret key. |
||
| 25 | self::ALGORITHM_HS256, // alg The signing algorithm. |
||
| 26 | ); |
||
| 61 |