From 7df0dfff9d8dafbadbef619787b935b2eaf4e525 Mon Sep 17 00:00:00 2001 From: Andrew Millington Date: Sun, 24 Jun 2018 13:31:38 +0100 Subject: [PATCH] Remove double function calls --- src/Grant/AbstractGrant.php | 6 ------ 1 file changed, 6 deletions(-) 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 {