Update BearerTokenResponse, return scopes in oauth/token endpoint. Fixes #5286

pull/5433/head
Daniel Supernault 11 months ago
parent d6cf5a622a
commit d8f5c3027c
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1

@ -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(),
];
}

Loading…
Cancel
Save