diff --git a/src/Service/IntrospectionService.php b/src/Service/IntrospectionService.php index 4677c5f..5da5ed6 100644 --- a/src/Service/IntrospectionService.php +++ b/src/Service/IntrospectionService.php @@ -50,10 +50,8 @@ public function introspect(OpenIDClient $client, string $token, array $params = $tokenRequest = $this->requestFactory->createRequest('POST', $endpointUri) ->withHeader('content-type', 'application/x-www-form-urlencoded'); + $params['token'] = $token; $tokenRequest = $authMethod->createRequest($tokenRequest, $client, $params); - $tokenRequest->getBody()->write(http_build_query(array_merge($params, [ - 'token' => $token, - ]))); $httpClient = $client->getHttpClient() ?? $this->client; diff --git a/src/Service/RevocationService.php b/src/Service/RevocationService.php index ab2d4ec..52993f0 100644 --- a/src/Service/RevocationService.php +++ b/src/Service/RevocationService.php @@ -48,10 +48,8 @@ public function revoke(OpenIDClient $client, string $token, array $params = []): $tokenRequest = $this->requestFactory->createRequest('POST', $endpointUri) ->withHeader('content-type', 'application/x-www-form-urlencoded'); + $params['token'] = $token; $tokenRequest = $authMethod->createRequest($tokenRequest, $client, $params); - $tokenRequest->getBody()->write(http_build_query(array_merge($params, [ - 'token' => $token, - ]))); $httpClient = $client->getHttpClient() ?? $this->client;