Skip to content

Commit fda18e1

Browse files
committed
Pass user id from old refresh token to finalizeScopes()
1 parent 2ed9e5f commit fda18e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Grant/RefreshTokenGrant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function respondToAccessTokenRequest(
6969
}
7070
}
7171

72-
$scopes = $this->scopeRepository->finalizeScopes($scopes, $this->getIdentifier(), $client);
72+
$scopes = $this->scopeRepository->finalizeScopes($scopes, $this->getIdentifier(), $client, $oldRefreshToken['user_id'] ?? null);
7373

7474
// Expire old tokens
7575
$this->accessTokenRepository->revokeAccessToken($oldRefreshToken['access_token_id']);

tests/Grant/RefreshTokenGrantTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ public function testRespondToRequestFinalizeScopes(): void
564564
$scopeRepositoryMock
565565
->expects(self::once())
566566
->method('finalizeScopes')
567-
->with($scopes, $grant->getIdentifier(), $client)
567+
->with($scopes, $grant->getIdentifier(), $client, '123', null)
568568
->willReturn($finalizedScopes);
569569

570570
$accessTokenRepositoryMock

0 commit comments

Comments
 (0)