Skip to content

Commit 7937e9c

Browse files
Also pass authCode
1 parent a77c786 commit 7937e9c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Grant/AuthCodeGrant.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use League\OAuth2\Server\Entities\ClientEntityInterface;
1313
use League\OAuth2\Server\Entities\ScopeEntityInterface;
1414
use League\OAuth2\Server\Entities\UserEntityInterface;
15+
use League\OAuth2\Server\Entities\AuthCodeEntityInterface;
1516
use League\OAuth2\Server\Exception\OAuthServerException;
1617
use League\OAuth2\Server\Repositories\AuthCodeRepositoryInterface;
1718
use League\OAuth2\Server\Repositories\RefreshTokenRepositoryInterface;
@@ -341,7 +342,7 @@ public function completeAuthorizationRequest(AuthorizationRequest $authorization
341342
'code_challenge_method' => $authorizationRequest->getCodeChallengeMethod(),
342343
];
343344

344-
$payload = array_merge($this->getExtraAuthCodeParams($authorizationRequest), $payload);
345+
$payload = array_merge($this->getExtraAuthCodeParams($authorizationRequest, $authCode), $payload);
345346

346347
$response = new RedirectResponse();
347348
$response->setRedirectUri(
@@ -378,10 +379,11 @@ public function completeAuthorizationRequest(AuthorizationRequest $authorization
378379
* for when you are issuing the token at the token endpoint
379380
*
380381
* @param AuthorizationRequest $authorizationRequest
382+
* @param AuthCodeEntityInterface $authCode
381383
*
382384
* @return array
383385
*/
384-
protected function getExtraAuthCodeParams(AuthorizationRequest $authorizationRequest)
386+
protected function getExtraAuthCodeParams(AuthorizationRequest $authorizationRequest, AuthCodeEntityInterface $authCode)
385387
{
386388
return [];
387389
}

0 commit comments

Comments
 (0)