diff --git a/src/BaseClient.php b/src/BaseClient.php index d232858..9da0bc1 100644 --- a/src/BaseClient.php +++ b/src/BaseClient.php @@ -274,7 +274,7 @@ protected function requestToken(string $clientId, string $clientSecret, TokenReq 'Accept' => 'application/json', 'Authorization' => sprintf('Basic %s', $credentials) ], - 'query' => $token->toArray() + 'body' => $token->toArray() ]); $responseTypes = [ diff --git a/tests/BaseClientTest.php b/tests/BaseClientTest.php index d97327c..cfdcf60 100644 --- a/tests/BaseClientTest.php +++ b/tests/BaseClientTest.php @@ -234,7 +234,7 @@ protected function authenticateByClientCredentials(?ResponseInterface $response 'Accept' => 'application/json', 'Authorization' => 'Basic ' . $credentials ], - 'query' => [ + 'body' => [ 'grant_type' => 'client_credentials' ] ])->willReturn($response); @@ -375,7 +375,7 @@ protected function authenticateByAuthorizationCode(?ResponseInterface $response 'Accept' => 'application/json', 'Authorization' => 'Basic ' . $credentials ], - 'query' => [ + 'body' => [ 'grant_type' => 'authorization_code', 'code' => '123456', 'redirect_uri' => 'http://someserver.xxx/redirect', @@ -430,7 +430,7 @@ protected function authenticateByRefreshToken(?ResponseInterface $response = nul 'Accept' => 'application/json', 'Authorization' => 'Basic ' . $credentials ], - 'query' => [ + 'body' => [ 'grant_type' => 'refresh_token', 'refresh_token' => $this->validRefreshToken->getToken() ] diff --git a/tests/ClientTest.php b/tests/ClientTest.php index 96a73b2..bf839ab 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -43,7 +43,7 @@ protected function authenticateByClientCredentials() 'Accept' => 'application/json', 'Authorization' => 'Basic ' . $credentials ], - 'query' => [ + 'body' => [ 'grant_type' => 'client_credentials' ] ])->willReturn($response);