| Conditions | 4 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | protected function getToken(?AccessTokenInterface $currentToken = null): AccessTokenInterface |
||
| 35 | { |
||
| 36 | if (!$currentToken || ($currentToken->getExpires() && !$currentToken->getRefreshToken())) { |
||
| 37 | return $this->provider->getAccessToken( |
||
| 38 | 'client_credentials', |
||
| 39 | ['resource' => $this->provider->resource] |
||
| 40 | ); |
||
| 41 | } |
||
| 42 | |||
| 43 | return $currentToken; |
||
| 44 | } |
||
| 46 |