From d8f5c3027cf37fe9b695968555c8f7bc7f1d1af5 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 5 Jan 2025 13:45:05 -0700 Subject: [PATCH] Update BearerTokenResponse, return scopes in oauth/token endpoint. Fixes #5286 --- app/Auth/BearerTokenResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Auth/BearerTokenResponse.php b/app/Auth/BearerTokenResponse.php index 0e1aa8a19..c9dc0a602 100644 --- a/app/Auth/BearerTokenResponse.php +++ b/app/Auth/BearerTokenResponse.php @@ -11,13 +11,13 @@ class BearerTokenResponse extends \League\OAuth2\Server\ResponseTypes\BearerToke * AuthorizationServer::getResponseType() to pull in your version of * this class rather than the default. * - * @param AccessTokenEntityInterface $accessToken * * @return array */ protected function getExtraParams(AccessTokenEntityInterface $accessToken) { return [ + 'scopes' => array_map(fn ($scope) => $scope->getIdentifier(), $accessToken->getScopes()), 'created_at' => time(), ]; }