mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 13:09:44 +05:30
Remove double function calls
This commit is contained in:
parent
ca6be0577c
commit
7df0dfff9d
@ -358,15 +358,9 @@ abstract class AbstractGrant implements GrantTypeInterface
|
|||||||
$maxGenerationAttempts = self::MAX_RANDOM_TOKEN_GENERATION_ATTEMPTS;
|
$maxGenerationAttempts = self::MAX_RANDOM_TOKEN_GENERATION_ATTEMPTS;
|
||||||
|
|
||||||
$accessToken = $this->accessTokenRepository->getNewToken($client, $scopes, $userIdentifier);
|
$accessToken = $this->accessTokenRepository->getNewToken($client, $scopes, $userIdentifier);
|
||||||
$accessToken->setClient($client);
|
|
||||||
$accessToken->setUserIdentifier($userIdentifier);
|
|
||||||
$accessToken->setExpiryDateTime((new \DateTime())->add($accessTokenTTL));
|
$accessToken->setExpiryDateTime((new \DateTime())->add($accessTokenTTL));
|
||||||
$accessToken->setPrivateKey($this->privateKey);
|
$accessToken->setPrivateKey($this->privateKey);
|
||||||
|
|
||||||
foreach ($scopes as $scope) {
|
|
||||||
$accessToken->addScope($scope);
|
|
||||||
}
|
|
||||||
|
|
||||||
while ($maxGenerationAttempts-- > 0) {
|
while ($maxGenerationAttempts-- > 0) {
|
||||||
$accessToken->setIdentifier($this->generateUniqueIdentifier());
|
$accessToken->setIdentifier($this->generateUniqueIdentifier());
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user