From b700af07c10026cfa299c89e9ddaf8730d379b83 Mon Sep 17 00:00:00 2001 From: Hafez Divandari Date: Wed, 30 Oct 2024 20:10:54 +0330 Subject: [PATCH] fix error message and changelog entry --- CHANGELOG.md | 2 +- src/Grant/DeviceCodeGrant.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83bb155e6..485a8ec64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Support for PHP 8.4 (PR #1454) ### Fixed -- Fixed bug where scopes were not set on access token when using device authorization grant (PR #1412) +- Fixed device code encryption / decryption and bug where scopes were not set on access token when using device authorization grant (PR #1412) ## [9.0.1] - released 2024-10-14 ### Fixed diff --git a/src/Grant/DeviceCodeGrant.php b/src/Grant/DeviceCodeGrant.php index c773c8550..374db16bb 100644 --- a/src/Grant/DeviceCodeGrant.php +++ b/src/Grant/DeviceCodeGrant.php @@ -188,7 +188,7 @@ protected function validateDeviceCode(ServerRequestInterface $request, ClientEnt try { $deviceCodePayload = json_decode($this->decrypt($encryptedDeviceCode)); } catch (LogicException $e) { - throw OAuthServerException::invalidRequest('code', 'Cannot decrypt the authorization code', $e); + throw OAuthServerException::invalidRequest('code', 'Cannot decrypt the device code', $e); } if (!property_exists($deviceCodePayload, 'device_code_id')) {