diff --git a/src/Grant/AbstractGrant.php b/src/Grant/AbstractGrant.php index d020c6ad..ed05dfac 100644 --- a/src/Grant/AbstractGrant.php +++ b/src/Grant/AbstractGrant.php @@ -358,15 +358,9 @@ abstract class AbstractGrant implements GrantTypeInterface $maxGenerationAttempts = self::MAX_RANDOM_TOKEN_GENERATION_ATTEMPTS; $accessToken = $this->accessTokenRepository->getNewToken($client, $scopes, $userIdentifier); - $accessToken->setClient($client); - $accessToken->setUserIdentifier($userIdentifier); $accessToken->setExpiryDateTime((new \DateTime())->add($accessTokenTTL)); $accessToken->setPrivateKey($this->privateKey); - foreach ($scopes as $scope) { - $accessToken->addScope($scope); - } - while ($maxGenerationAttempts-- > 0) { $accessToken->setIdentifier($this->generateUniqueIdentifier()); try {