Update oauth/token, fix scope to be space separated string instead of array

pull/5448/head
Daniel Supernault 2 months ago
parent 3749267260
commit 4ce6e610bd
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1

@ -17,7 +17,7 @@ class BearerTokenResponse extends \League\OAuth2\Server\ResponseTypes\BearerToke
protected function getExtraParams(AccessTokenEntityInterface $accessToken) protected function getExtraParams(AccessTokenEntityInterface $accessToken)
{ {
return [ return [
'scope' => array_map(fn ($scope) => $scope->getIdentifier(), $accessToken->getScopes()), 'scope' => implode(' ', array_map(fn ($scope) => $scope->getIdentifier(), $accessToken->getScopes())),
'created_at' => time(), 'created_at' => time(),
]; ];
} }

Loading…
Cancel
Save