Created
May 21, 2018 05:59
-
-
Save DavidOndrus/b8a7c011492821c66bf69a855f4af751 to your computer and use it in GitHub Desktop.
updated RefreshTokenGrant.php:respondToAccessTokenRequest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$newScopes = array(); | |
$newScopesIdentifiers = array(); | |
foreach ($scopes as $scope) { | |
if (in_array($scope->getIdentifier(), $oldRefreshToken['scopes'])) { | |
array_push($newScopes, $scope); | |
array_push($newScopesIdentifiers, $scope->getIdentifier()); | |
} | |
} | |
... | |
$accessToken = $this->issueAccessToken($accessTokenTTL, $client, $oldRefreshToken['user_id'], $newScopes); | |
... | |
$responseType->setTokenScopes($newScopesIdentifiers); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment