From aba78a6879a86d84625ba96ac1b94c7c116a9e0d Mon Sep 17 00:00:00 2001 From: Andrew Winter Date: Thu, 29 Feb 2024 11:46:31 +0900 Subject: [PATCH 1/2] Check that the attributes `grant_types` isset rather than property --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index 78f9009e..15f91ff1 100644 --- a/src/Client.php +++ b/src/Client.php @@ -164,7 +164,7 @@ public function skipsAuthorization() */ public function hasGrantType($grantType) { - if (! isset($this->grant_types) || ! is_array($this->grant_types)) { + if (! isset($this->attributes['grant_types']) || ! is_array($this->grant_types)) { return true; } From 829e141a9938075f08ca99067e3d25ff898b56ea Mon Sep 17 00:00:00 2001 From: Andrew Winter Date: Thu, 29 Feb 2024 12:12:34 +0900 Subject: [PATCH 2/2] Cover `scopes` as well --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index 15f91ff1..727a6e28 100644 --- a/src/Client.php +++ b/src/Client.php @@ -179,7 +179,7 @@ public function hasGrantType($grantType) */ public function hasScope($scope) { - if (! isset($this->scopes) || ! is_array($this->scopes)) { + if (! isset($this->attributes['scopes']) || ! is_array($this->scopes)) { return true; }