mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-05 19:43:56 +05:30
Updated method calls
This commit is contained in:
parent
76ea6b5a6c
commit
44937f3600
@ -34,7 +34,7 @@ class AuthenticationServerMiddleware
|
|||||||
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)
|
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$response = $this->server->respondToRequest($request, $response);
|
$response = $this->server->respondToAccessTokenRequest($request, $response);
|
||||||
} catch (OAuthServerException $exception) {
|
} catch (OAuthServerException $exception) {
|
||||||
return $exception->generateHttpResponse($response);
|
return $exception->generateHttpResponse($response);
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
|
@ -139,7 +139,7 @@ class Server implements EmitterAwareInterface
|
|||||||
$tokenResponse = null;
|
$tokenResponse = null;
|
||||||
while ($tokenResponse === null && $grantType = array_shift($this->enabledGrantTypes)) {
|
while ($tokenResponse === null && $grantType = array_shift($this->enabledGrantTypes)) {
|
||||||
/** @var \League\OAuth2\Server\Grant\GrantTypeInterface $grantType */
|
/** @var \League\OAuth2\Server\Grant\GrantTypeInterface $grantType */
|
||||||
if ($grantType->canRespondToRequest($request)) {
|
if ($grantType->canRespondToAccessTokenRequest($request)) {
|
||||||
$tokenResponse = $grantType->respondToRequest(
|
$tokenResponse = $grantType->respondToRequest(
|
||||||
$request,
|
$request,
|
||||||
$this->getResponseType(),
|
$this->getResponseType(),
|
||||||
|
Loading…
Reference in New Issue
Block a user