| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function makeToken(): string |
||
| 30 | { |
||
| 31 | if ($this->apiKey === '' || $this->apiSecret === '') { |
||
| 32 | throw new \InvalidArgumentException('Zoom JWT: missing API Key/Secret'); |
||
| 33 | } |
||
| 34 | |||
| 35 | $payload = [ |
||
| 36 | 'iss' => $this->apiKey, |
||
| 37 | 'exp' => time() + 55, // short-lived token |
||
| 38 | ]; |
||
| 39 | |||
| 40 | return JWT::encode($payload, $this->apiSecret, 'HS256'); |
||
| 41 | } |
||
| 43 |