Skip to content

Commit a37098d

Browse files
committed
Merge pull request #30 from simpleweb/master
Access token missing for remote resource request
2 parents 07816d3 + fa54582 commit a37098d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/OAuth2Demo/Client/Controllers/RequestResource.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public function requestResource(Application $app)
2929
$endpoint = 0 === strpos($apiRoute, 'http') ? $apiRoute : $urlgen->generate($apiRoute, $config['resource_params'], true);
3030

3131
// make the resource request and decode the json response
32-
$response = $http->get($endpoint, null, $config['http_options'])->send();
32+
$request = $http->get($endpoint, null, $config['http_options']);
33+
$request->getQuery()->set('access_token', $token);
34+
$response = $request->send();
3335
$json = json_decode((string) $response->getBody(), true);
3436

3537
$resource_uri = sprintf('%s%saccess_token=%s', $endpoint, false === strpos($endpoint, '?') ? '?' : '&', $token);

0 commit comments

Comments
 (0)