| Total Complexity | 2 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 11 | class JWTGenerator |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Create JWT token used by Atlassian REST API request |
||
| 15 | * |
||
| 16 | * @param RequestInterface $request |
||
| 17 | * @param string $issuer Key of the add-on |
||
| 18 | * @param string $secret Shared secret of the Tenant |
||
| 19 | * |
||
| 20 | * @return string |
||
| 21 | */ |
||
| 22 | public static function generate(RequestInterface $request, string $issuer, string $secret): string |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $secret |
||
| 36 | * @param string $oauthClientId |
||
| 37 | * @param string $baseUrl |
||
| 38 | * @param string $user |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public static function generateAssertion(string $secret, string $oauthClientId, string $baseUrl, string $user): string |
||
| 56 |