mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
The response may be a PSR response which is valid
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user