Skip to content

Commit 5417fe8

Browse files
Pass user identifier through to finalize scopes in personal access grant (#1650)
1 parent ef5fa30 commit 5417fe8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/Bridge/PersonalAccessGrant.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,22 @@ public function respondToAccessTokenRequest(
2020
// Validate request
2121
$client = $this->validateClient($request);
2222
$scopes = $this->validateScopes($this->getRequestParameter('scope', $request));
23+
$userIdentifier = $this->getRequestParameter('user_id', $request);
2324

2425
// Finalize the requested scopes
25-
$scopes = $this->scopeRepository->finalizeScopes($scopes, $this->getIdentifier(), $client);
26+
$scopes = $this->scopeRepository->finalizeScopes(
27+
$scopes,
28+
$this->getIdentifier(),
29+
$client,
30+
$userIdentifier
31+
);
2632

2733
// Issue and persist access token
2834
$accessToken = $this->issueAccessToken(
29-
$accessTokenTTL, $client,
30-
$this->getRequestParameter('user_id', $request), $scopes
35+
$accessTokenTTL,
36+
$client,
37+
$userIdentifier,
38+
$scopes
3139
);
3240

3341
// Inject access token into response type

0 commit comments

Comments
 (0)