Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
49 | public function refresh(string $refreshToken) |
||
50 | { |
||
51 | $result = $this->newClient()->call('POST', 'oauth2/token', [], [ |
||
52 | 'client_id' => $this->id, |
||
53 | 'client_secret' => $this->secret, |
||
54 | 'refresh_token' => $refreshToken, |
||
55 | 'grant_type' => 'refresh_token', |
||
56 | ]); |
||
57 | |||
58 | // set the access token to the new one |
||
59 | $this->token($result['access_token']); |
||
60 | |||
61 | return $result; |
||
62 | } |
||
96 |