Skip to content

Commit

Permalink
Check that properties grant_types and scopes exist (#1722)
Browse files Browse the repository at this point in the history
* Check that the attributes `grant_types` isset rather than property

* Cover `scopes` as well
  • Loading branch information
uintaam authored Feb 29, 2024
1 parent 72e805a commit a56f7dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit a56f7dd

Please sign in to comment.