mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-03 18:51:53 +05:30
commit
a53e753b1a
@ -178,7 +178,9 @@ class AuthorizationServer implements EmitterAwareInterface
|
|||||||
public function respondToAccessTokenRequest(ServerRequestInterface $request, ResponseInterface $response)
|
public function respondToAccessTokenRequest(ServerRequestInterface $request, ResponseInterface $response)
|
||||||
{
|
{
|
||||||
foreach ($this->enabledGrantTypes as $grantType) {
|
foreach ($this->enabledGrantTypes as $grantType) {
|
||||||
if ($grantType->canRespondToAccessTokenRequest($request)) {
|
if (!$grantType->canRespondToAccessTokenRequest($request)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$tokenResponse = $grantType->respondToAccessTokenRequest(
|
$tokenResponse = $grantType->respondToAccessTokenRequest(
|
||||||
$request,
|
$request,
|
||||||
$this->getResponseType(),
|
$this->getResponseType(),
|
||||||
@ -188,7 +190,7 @@ class AuthorizationServer implements EmitterAwareInterface
|
|||||||
if ($tokenResponse instanceof ResponseTypeInterface) {
|
if ($tokenResponse instanceof ResponseTypeInterface) {
|
||||||
return $tokenResponse->generateHttpResponse($response);
|
return $tokenResponse->generateHttpResponse($response);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw OAuthServerException::unsupportedGrantType();
|
throw OAuthServerException::unsupportedGrantType();
|
||||||
|
Loading…
Reference in New Issue
Block a user