| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function get(string $handle): string |
||
| 31 | { |
||
| 32 | if (!in_array($handle, $this->handles)) { |
||
| 33 | throw new JwtException('不支持此方式获取.', 500); |
||
| 34 | } |
||
| 35 | |||
| 36 | $this->token = (new Header($this->app))->handle(); |
||
| 37 | |||
| 38 | if (!$this->token) { |
||
| 39 | throw new JwtException('获取Token失败.', 500); |
||
| 40 | } |
||
| 41 | |||
| 42 | return $this->token; |
||
| 43 | } |
||
| 45 |