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