Skip to content

Commit 3985380

Browse files
committed
Pass user id from old refresh token to finalizeScopes()
1 parent 07920aa commit 3985380

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Grant/RefreshTokenGrant.php

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ public function testRespondToRequestFinalizeScopes(): void
573573
$scopeRepositoryMock
574574
->expects(self::once())
575575
->method('finalizeScopes')
576-
->with($scopes, $grant->getIdentifier(), $client)
576+
->with($scopes, $grant->getIdentifier(), $client, '123', null)
577577
->willReturn($finalizedScopes);
578578

579579
$accessToken = new AccessTokenEntity();

0 commit comments

Comments
 (0)