The response may be a PSR response which is valid

This commit is contained in:
Alex Bilbie 2016-02-12 14:18:45 +00:00
parent 796106b6c1
commit 1a5030200a

View File

@ -137,7 +137,11 @@ class Server implements EmitterAwareInterface
}
}
if (!$tokenResponse instanceof ResponseTypeInterface) {
if ($tokenResponse instanceof ResponseInterface) {
return $tokenResponse;
}
if ($tokenResponse instanceof ResponseTypeInterface === false) {
return OAuthServerException::unsupportedGrantType()->generateHttpResponse($response);
}