Skip to content

Commit

Permalink
revert changed argument name
Browse files Browse the repository at this point in the history
  • Loading branch information
hafezdivandari committed Dec 3, 2024
1 parent 764412d commit d4742e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Grant/DeviceCodeGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct(
RefreshTokenRepositoryInterface $refreshTokenRepository,
private DateInterval $deviceCodeTTL,
string $verificationUri,
private readonly int $defaultInterval = 5
private readonly int $retryInterval = 5
) {
$this->setDeviceCodeRepository($deviceCodeRepository);
$this->setRefreshTokenRepository($refreshTokenRepository);
Expand Down Expand Up @@ -220,7 +220,7 @@ protected function validateDeviceCode(ServerRequestInterface $request, ClientEnt

private function deviceCodePolledTooSoon(?DateTimeImmutable $lastPoll): bool
{
return $lastPoll !== null && $lastPoll->getTimestamp() + $this->defaultInterval > time();
return $lastPoll !== null && $lastPoll->getTimestamp() + $this->retryInterval > time();
}

/**
Expand Down Expand Up @@ -264,7 +264,7 @@ protected function issueDeviceCode(
$deviceCode->setExpiryDateTime((new DateTimeImmutable())->add($deviceCodeTTL));
$deviceCode->setClient($client);
$deviceCode->setVerificationUri($verificationUri);
$deviceCode->setInterval($this->defaultInterval);
$deviceCode->setInterval($this->retryInterval);

foreach ($scopes as $scope) {
$deviceCode->addScope($scope);
Expand Down

0 comments on commit d4742e8

Please sign in to comment.