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

This commit is contained in:
Daniel Supernault 2025-01-08 19:54:38 -07:00
parent 3749267260
commit 4ce6e610bd
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

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