Skip to content

Commit

Permalink
Merge pull request #6 from klAvAx/master
Browse files Browse the repository at this point in the history
Bugfixes & 1 Enhancement
  • Loading branch information
Ezra Lazuardy committed Apr 4, 2021
2 parents 3ba9b60 + e8a01dd commit 1097f25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Server/HeimdallResourceServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,18 @@ function handleException(Exception $exception)
* @param RequestInterface $request
* @throws HeimdallServerException
*/
function validate(RequestInterface $request)
function validate(RequestInterface &$request)
{
try {
return $this->server->validateAuthenticatedRequest(
$response = $this->server->validateAuthenticatedRequest(
Heimdall::handleRequest(
new IncomingRequest(config('app'),
$request->uri, $request->getBody(),
$request->getUserAgent()
)
)
);
$request->setHeader('authorization', $response->getAttributes());
} catch (OAuthServerException $exception) {
throw new HeimdallServerException(
$exception->getMessage(),
Expand Down

0 comments on commit 1097f25

Please sign in to comment.