From 44937f36009407b740596d142b269bf65ca31b24 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 9 Apr 2016 16:22:22 +0100 Subject: [PATCH] Updated method calls --- src/Middleware/AuthenticationServerMiddleware.php | 2 +- src/Server.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Middleware/AuthenticationServerMiddleware.php b/src/Middleware/AuthenticationServerMiddleware.php index 2d5ffe41..83f3f1c5 100644 --- a/src/Middleware/AuthenticationServerMiddleware.php +++ b/src/Middleware/AuthenticationServerMiddleware.php @@ -34,7 +34,7 @@ class AuthenticationServerMiddleware public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) { try { - $response = $this->server->respondToRequest($request, $response); + $response = $this->server->respondToAccessTokenRequest($request, $response); } catch (OAuthServerException $exception) { return $exception->generateHttpResponse($response); // @codeCoverageIgnoreStart diff --git a/src/Server.php b/src/Server.php index 3513d642..ba18ce91 100644 --- a/src/Server.php +++ b/src/Server.php @@ -139,7 +139,7 @@ class Server implements EmitterAwareInterface $tokenResponse = null; while ($tokenResponse === null && $grantType = array_shift($this->enabledGrantTypes)) { /** @var \League\OAuth2\Server\Grant\GrantTypeInterface $grantType */ - if ($grantType->canRespondToRequest($request)) { + if ($grantType->canRespondToAccessTokenRequest($request)) { $tokenResponse = $grantType->respondToRequest( $request, $this->getResponseType(),