@@ -33,9 +33,7 @@ class Connection
33
33
34
34
private const TOKEN_URL = '/oauth/token ' ;
35
35
36
- private const REFRESH_URL = '/oauth/token/refresh ' ;
37
-
38
- private const VERSION = '1.0 ' ;
36
+ private const VERSION = '1.0.1 ' ;
39
37
40
38
/** @var Client|null */
41
39
private ?Client $ client = null ;
@@ -289,22 +287,17 @@ private function acquireAccessToken(): void
289
287
'client_secret ' => $ this ->clientSecret ,
290
288
'code ' => $ this ->authorizationCode ,
291
289
];
292
-
293
- $ response = $ this ->getClient ()->post (self ::BASE_URL . self ::TOKEN_URL , ['form_params ' => $ parameters ]);
294
290
} else {
295
291
$ parameters = [
296
292
'refresh_token ' => $ this ->refreshToken ,
297
293
'grant_type ' => 'refresh_token ' ,
298
294
'client_id ' => $ this ->clientId ,
299
295
'client_secret ' => $ this ->clientSecret ,
300
296
];
301
-
302
- $ response = $ this ->getClient ()->post (
303
- self ::BASE_URL . self ::REFRESH_URL ,
304
- ['form_params ' => $ parameters ]
305
- );
306
297
}
307
298
299
+ $ response = $ this ->getClient ()->post (self ::BASE_URL . self ::TOKEN_URL , ['form_params ' => $ parameters ]);
300
+
308
301
Message::rewindBody ($ response );
309
302
310
303
$ responseBody = $ response ->getBody ()->getContents ();
0 commit comments