Skip to content

Commit

Permalink
Prevent casing null user ID to string
Browse files Browse the repository at this point in the history
  • Loading branch information
ssigwart committed Aug 8, 2024
1 parent d5419d5 commit 113bb14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Grant/RefreshTokenGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ public function respondToAccessTokenRequest(
}

// Issue and persist new access token
$accessToken = $this->issueAccessToken($accessTokenTTL, $client, (string)$oldRefreshToken['user_id'], $scopes);
$userId = $oldRefreshToken['user_id'];
if (is_int($userId))
$userId = (string)$userId;
$accessToken = $this->issueAccessToken($accessTokenTTL, $client, $userId, $scopes);
$this->getEmitter()->emit(new RequestAccessTokenEvent(RequestEvent::ACCESS_TOKEN_ISSUED, $request, $accessToken));
$responseType->setAccessToken($accessToken);

Expand Down

0 comments on commit 113bb14

Please sign in to comment.