mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-15 02:54:30 +00:00
26 lines
678 B
PHP
26 lines
678 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Auth;
|
||
|
|
||
|
use League\OAuth2\Server\Entities\AccessTokenEntityInterface;
|
||
|
|
||
|
class BearerTokenResponse extends \League\OAuth2\Server\ResponseTypes\BearerTokenResponse
|
||
|
{
|
||
|
/**
|
||
|
* Add custom fields to your Bearer Token response here, then override
|
||
|
* 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 [
|
||
|
'created_at' => time(),
|
||
|
'scope' => 'read write follow push'
|
||
|
];
|
||
|
}
|
||
|
}
|