mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-10 14:10:46 +00:00
Update BearerTokenResponse, return scopes in oauth/token endpoint. Fixes #5286
This commit is contained in:
parent
d6cf5a622a
commit
d8f5c3027c
1 changed files with 1 additions and 1 deletions
|
@ -11,13 +11,13 @@ class BearerTokenResponse extends \League\OAuth2\Server\ResponseTypes\BearerToke
|
||||||
* AuthorizationServer::getResponseType() to pull in your version of
|
* AuthorizationServer::getResponseType() to pull in your version of
|
||||||
* this class rather than the default.
|
* this class rather than the default.
|
||||||
*
|
*
|
||||||
* @param AccessTokenEntityInterface $accessToken
|
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function getExtraParams(AccessTokenEntityInterface $accessToken)
|
protected function getExtraParams(AccessTokenEntityInterface $accessToken)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
'scopes' => array_map(fn ($scope) => $scope->getIdentifier(), $accessToken->getScopes()),
|
||||||
'created_at' => time(),
|
'created_at' => time(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue