From 61d710ff44779c357703063902f9da0a654fd5c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20J=2E=20Garc=C3=ADa=20Lagar?= Date: Fri, 22 Nov 2024 10:24:54 +0100 Subject: [PATCH] Fix compatibility with `league/oauth2-server:^9.1` See https://github.com/thephpleague/oauth2-server/pull/1433 --- composer.json | 2 +- tests/Integration/AuthorizationServerTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index e6c4999..fd777c7 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "ext-openssl": "*", "doctrine/doctrine-bundle": "^2.8.0", "doctrine/orm": "^2.14|^3.0", - "league/oauth2-server": "^9.0.1", + "league/oauth2-server": "^9.1", "nyholm/psr7": "^1.4", "psr/http-factory": "^1.0", "symfony/event-dispatcher": "^5.4|^6.2|^7.0", diff --git a/tests/Integration/AuthorizationServerTest.php b/tests/Integration/AuthorizationServerTest.php index a9a708f..98d8dee 100644 --- a/tests/Integration/AuthorizationServerTest.php +++ b/tests/Integration/AuthorizationServerTest.php @@ -682,8 +682,8 @@ public function testFailedAuthorizationWithExpiredCode(): void $response = $this->handleTokenRequest($request); // Response assertions. - $this->assertSame('invalid_request', $response['error']); - $this->assertSame('The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.', $response['error_description']); + $this->assertSame('invalid_grant', $response['error']); + $this->assertSame('The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.', $response['error_description']); $this->assertSame('Authorization code has expired', $response['hint']); }