Updated method calls

This commit is contained in:
Alex Bilbie 2016-04-09 16:22:22 +01:00
parent 76ea6b5a6c
commit 44937f3600
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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(),