Skip to content

Commit

Permalink
Fix scope entity problem
Browse files Browse the repository at this point in the history
  • Loading branch information
craigp1231 committed Feb 3, 2025
1 parent 236654e commit dd3f880
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Grant/RefreshTokenGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,18 @@ public function respondToAccessTokenRequest(
return $responseType;
}

$originalScopes = $oldRefreshToken->getScopes();
$originalScopeArray = [];
foreach ($originalScopes as $scopeEntity) {
$originalScopeArray[$scopeEntity->getIdentifier()] = $scopeEntity->getIdentifier();
}
$originalScopeArray = array_values($originalScopeArray);

$scopes = $this->validateScopes(
$this->getRequestParameter(
'scope',
$request,
implode(self::SCOPE_DELIMITER_STRING, $oldRefreshToken->getScopes())
implode(self::SCOPE_DELIMITER_STRING, $originalScopeArray)
)
);

Expand Down

0 comments on commit dd3f880

Please sign in to comment.